.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Memory issue

Posted By:      Posted Date: December 04, 2010    Points: 0   Category :Sql Server

Hi Gurus,

we have a sql2005 installed on windows 2003 server with 4gb of RAM.

We have lot of transaction intensive procedures/functions running on every minute through sql agent. My 'Available Physical Memory' is going down hour by hour and after some point of time, the sql agent stops automatically due to memory pressure. I checked blocks and lock on the database server and failed to see anything of those kind.

Can I use dbcc commands to clear memory related cache?

This is driving me crazy and please help me to resolve this.

Best regards, Sengwa


View Complete Post

More Related Resource Links

Memory Management issue while calling COM method from .Net component

Hi all,  The Com Component Method say(GetChildresponse) requires Byte pointer as input. From .Net Component, while calling GetChildResponse  I am creating IntPtr and passing it to Component.  I am only creating the pointer in my .Net Component but allocation of bytes(CoTaskMemAlloc) happens at COM Method. After populating the pointer buffer, I am transferring to memory buffer in .Net method and Free the memorry of the pointer using "Marshal.FreeCoTaskMem" method.  Still I am not sure, whether it is deallocating the memory since the Garbarge collector wont happen immediately.  We are hitting on performance issue while doing load testing and we suspect this might be due to memory allocation that is not getting deallocated properly. Any pointers would be helpful. Thanks, Nithya Sample Code: unsafe {   // Get the physical memory address ocpHeaderBufferPointer = new IntPtr((void*)&ocpHeaderBufferPointer); temporaryResponseBufferPointer = new IntPtr((void*)&temporaryResponseBufferPointer); }   try {   try {   // Call the GetResponse of the pass through ocpChannel   new OCPChannelDSClass().GetResponse((uint)transactionId, ocpHeaderBufferPointer, out ocpHeaderBufferSize, temporaryResponseBufferPointer, out temporaryResponseBufferSize, (uint)timeout); }   catch (Exception ex) { &nbs

sql 2000 Ent memory issue

sql 2000 ent frequently get insufficient memory error when backing up on tlog or do a bulk import, even now increased to 8GB from original 2GB. After restart sql server service, then able to run bulk import, noticed buffer increased around 260MB. of cause tlog can be backup too after sql restart. Don't have any clue now, can someone give some advice or hint? OS is w2k3 Ent 32bit.  

Issue - A significant part of sql server memory has been paged out.


Hello Experts,

I am running a huge SSRS 2008 report and it gets rendered sometimes and sometimes it gives me an error,

"The report execution has expired or cannot be found. (rsExecutionNotFound)”.

When I see SQL Server log after this issue comes I see following message there;

"A significant part of sql server memory has been paged out. This may result in performance degradation. Duration: 300 seconds. Working set(KB): 97672, memory utilization 42%"

Please help me to know what is the issue and how to fix it.


Workflow Designer 4.0 Load() Performance Issue: possible memory leak?


Hello everybody,

I am trying to implement a workflow designer in a windows form application and use the same designer to view different workflows. However, I found the program became slower and slower after loading several workflows.

my steps are as follows:

1. create a wpf user control WFDesigner to package the workflowdesigner;

2. In the user control  WFDesigner , implement a InitiateDesigner method which create a new workflowDesigner instance each time called. I suppose the old workflowDesigner instance would be collected by GC;

3. create a winform application and install the user control created on step 2 to an element host, and put the element host on the form. 

4. add two buttons for test: one will execute  WFDesigner.InitiateDesigner() once and the other will execute it 100 times.

Memory issue vith SQL2008 SP2 on a 64 bits W2008


Hi to all !

Sometimes, my production system crashes, and a "memory status" is displayed in my errorlog.

I suspect that a stored procedure could be responsible...

Is anybody can tell me what pool is concerned by the issue ?

There is no message before the memory status, and just after it, i have :

2010-10-27 16:40:26.46 spid117     Error: 701, Severity: 17, State: 123.
2010-10-27 16:40:26.46 spid117     There is insufficient system memory in resource pool 'internal' to run this query.

Thanks for help !



Memory Manager                                   KB
---------------------------------------- ----------
VM Reserved                                 4311480
VM Committed                                4287208
Locked Pages Allocated    

How to detect and avoid memory and resources leaks in .NET application

Despite what a lot of people believe, it's easy to introduce memory and resources leaks in .NET applications. The Garbage Collector, or GC for close friends, is not a magician who would completely relieve you from taking care of your memory and resources consumption.

I'll explain in this article why memory leaks exist in .NET and how to avoid them. Don't worry, I won't focus here on the inner workings of the garbage collector and other advanced characteristics of memory and resources management in .NET.

IsapiModule Error 500 Issue


I am about exhausted trying to figure out this error:

HTTP Error 500.0 - Internal Server Error

Description: The page cannot be displayed because an internal server error has occurred.

Error Code: 0x8007007b

Notification: ExecuteRequestHandler

Module: IsapiModule

Requested URL: http://localhost:80/ReportServer

Physical Path: c:\Program Files\Microsoft SQL Server\MSSQL.2\Reporting Services\ReportServer

When I enable Failed Request Tracing Rules and view the log output I am supposing that the actual problem is in the 2nd call where there are 2 backslashes before the actual filename in the specified path:


CALL_ISAPI_EXTENSION DllName="C:\Windows\Microsoft.NET\Framework\v2.0.50727\\aspnet_isapi.dll"


MVC2 issue - Stuck. Trying to create a cms with nested partials


I am currently trying to display multiple items on a single page. I am not sure as to how to tackle this. What I have is a database table that has all the page data in. I have this run as a PagesController and this works fine. However what I would like to do is, if say the Products page is selected via the menu, I want to pull back not only the Products page html but also get all the products, and even be able to pull them through via category. I was trying to use a partial view, but I can't get it to work. The same would be for other pages, having partial views to display the other content, ie if Gallery is selected, the page html for Gallery shows and it then can push to a partial view that pulls all the gallery images from the gallery db table and so on. 

Maybe I am tackling this the wrong way. I have the pages stored in the db to allow for a CMS system I have setup. Maybe I need to use models for all the other items(Products, Gallery, Videos and such) and use the partial for the page html?

Any help would be greatly appreciated as I am confused.

file upload in chunks or not buffering in memory before writing to disk?


What are the options for handling file uploads to reduce the memory footprint?  Is there a way to upload in chunks?  Is there a way to stream upload directly to disk instead of loading entire file in server memory?


Visual Studio 2008 Memory problems


My memory in task manager reaches about 900,000K  and I don't know why it does this. Definately slows everything down, especially when I rebuild my tableAdapters, takes about 30 seconds sometimes to rebuild the project.

xpath issue


Hi i am using xpath to loop through each node,

the xml is below i can get the value of "link" but i cant get the thumbnail value, have you got any ideas how i can do this, my code is below.



     <link>test 1</link>
     <media:thumbnail url="http://test.com/image.jpg" height="75" width="75" />



     <link>test 2</link>
     <media:thumbnail url="http://test.com/image.jpg" height="75" width="75" />


public void FindLinks(XPathNavigator p_xPathNav, DataTable dt)
            //run the XPath query
            XPathNodeIterator xPathIt = p_xPathNav.Select("//item");

            //use the

User validation Issue in xlsx file



I am validating user from Login.xlsx file. It was working fine by validating email and password from that file. For testing i got new file same contents of file but added some more user names.

So after that when i validating the user i am getting the following error "Data type mismatch in criteria expression".

But when i replaced the new to old one it is working fine. The contens of both files are the same. So why this kind of error happened.


Multiple Paramatized Threading issue


I need the funcitonality to have two methods run concurrently of each other and the parent thread (aka the method that makes these two calls) to halt until BOTH are done. After the threads are done, I need to perform logic on the returns of the method, so it is essential for both of them to be complete before the parent thread continues. I have searched the internet and tried varous attacks, and I always come up with the same result, this being the parent thread continues operation after the first thread finishes, leaving the second thread running.  Can someone show me a quick example of how I can do this. I have tried checking states of the threads, halting the threads, but I always end up with the same thing. Any help would be great. Thanks.

Data Truncation issue with Enterprise Library Logging WriteLog stored Proc


Hi ,

I'm using Enterprise Library Logging  feature for logging. The issue i am facing is when the Logging message is too large(more than 65534 chars) ,complete data  is not logged in the Formatted Mesage column which is  of data Type nText .

I am able insert complete data if i try inserting from Sql insert Query from sql management studio. Do i need to add any attributes to data base listener or do i need to change the sp.

 Is there any way to increase the WriteLog stored proc param size in EnterpriseLibrary.Logging config file ? . Please let me know.


Thanks In Advance.

Word Automation Issue in Windows Server 2008 Hosting



The problem I am posting here is that I was facing nearly 2 weeks around. Any body comes with this stuff please help.

Word Automation in sample ASP.NET(C#) application.

I am using Microsoft.Office.Inetrop.Word Assembly for automation. Here I am reading a XXX.dot template file and fill the contents with dynamic data.

When i am executing my code in localhost:someportnumber the automation is working fine and I could get expected result and when I am hosting in my inetmgr(Windows XP is my OS) it is also working fine.

But the problem is that when I am hosting in my production server(Windows Server 2008 Standard Edition) I am not able to perform automation and results in the following error.

Data: System.Collections.ListDictionaryInternal
Message: Word has encountered a problem.
Source: Microsoft Word

The code gets failed in the following line:

ApplicationClass wordApp = new Microsoft.Office.Interop.Word.ApplicationClass();

Document wordDoc = wordApp.Documents.Add(ref oTemplate, ref oFalse, ref oMissing, ref oMissing); // Error in this line

I cannot able to proceed further. Can anybody please help me in solving this issue?

Thank you.

With Regards,


Crystal Report gives System.AccessViolationException: Attempted to read or write protected memory. T


when a crystal report for same id is opened again at same time or refreshed then it gives the

"System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt."

Stack Trace is :-

Stack Trace:

[AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.]
CrystalDecisions.ReportAppServer.Controllers.DatabaseControllerClass.SetConnectionInfos(ConnectionInfos ConnectionInfos) +0
CrystalDecisions.CrystalReports.Engine.Table.ApplyLogOnInfo(TableLogOnInfo logonInfo) +362
CrystalDecisions.CrystalReports.Engine.ReportDocument.SetTableLogon(Tables tables, String user, String password, String server, String database, Boolean ignoreCase) +258
CrystalDecisions.CrystalReports.Engine.ReportDocument.SetDatabaseLogon(String user, String password, String server, String database, Boolean ignoreCase) +204
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend