Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Insufficient memory error Expand / Collapse
Author
Message
Posted Wednesday, July 25, 2007 6:26 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Wednesday, February 01, 2012 1:51 AM
Points: 229, Visits: 375

Hi

We are getting the following error on one of our servers:

'Error 22022: Unable to post notification to SQL
ServerAgent (reason: MapViewOfFile() returned error
8, 'Not enough storage is available to process this
command')

This causes that none of the jobs on the database to run. A restart of the SQL Service solves the error for the time being.

I read a thread and someone said that the SQL Server Agent Job log was full. Does anyone know where I can find this and can the job logs be deleted?

Regards

IC

Post #385018
Posted Wednesday, July 25, 2007 8:55 AM
Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Tuesday, October 11, 2011 4:02 PM
Points: 3,190, Visits: 317
In SQL Server 2000, the SQL Server Error Log can be found in Enterprise Manager at >Management>SQL Server Logs. Running the command sp_cycle_errorlog in Query Analyzer cycles the log. Reading the log, at the beginning you will see an entry that gives the path to where you can find the log file itself and open it in notepad (this is helpful as the log can be too large to open in Enterprise Manager).

In SQL Server 2005, there are two logs. The Error Log can be found at Management>SQL Server Logs and the Agent log can be found at SQL Server Agent>Error Logs. Use the same command as in 2000 for cycling the Error Log. For the Agent log use sp_cycle_agent_errorlog.

-SQLBill



Post #385122
Posted Thursday, July 26, 2007 8:28 AM


SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Sunday, February 05, 2012 2:29 PM
Points: 962, Visits: 304

Hi Imke,

What is the response to

Select @@version

On your server?

 

Post #385441
Posted Friday, July 27, 2007 1:24 AM


SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Yesterday @ 3:53 AM
Points: 498, Visits: 1,175

What is memory configuration of the SQL Server. ?

1. Check if there is fragmentaion of the virtual memory then defrag it.

2. Check the output of the DBCC MEMORYSTATUS shown where the memory have been used.

Minaz Amin

 



"More Green More Oxygen !! Plant a tree today"
Post #385680
Posted Friday, July 27, 2007 1:51 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Wednesday, February 01, 2012 1:51 AM
Points: 229, Visits: 375

Jeff - Response from select @@version:

Microsoft SQL Server  2000 - 8.00.2039 (Intel X86)   May  3 2005 23:18:38   Copyright (c) 1988-2003 Microsoft Corporation  Enterprise Edition on Windows NT 5.2 (Build 3790: Service Pack 2)

 

Minaz -

the virtual memory has already been defragged.

Post #385689
Posted Friday, July 27, 2007 6:12 AM


SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Yesterday @ 3:53 AM
Points: 498, Visits: 1,175

As SQLBill, try to recycle the log.

 What is the total server memory ? What is the max / min SQL server memory?

is there /3GB is enabled in the Boot.ini ?


 



"More Green More Oxygen !! Plant a tree today"
Post #385737
Posted Friday, July 27, 2007 6:27 AM


SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Sunday, February 05, 2012 2:29 PM
Points: 962, Visits: 304

Do you have any messages in the SQL server error log similar to this:

WARNING: Failed to reserve contiguous memory of Size= 131072.

Also, what is the function MapViewOfFile() doing?

Does it contain any XML manipulation or OA_Create code? 

The reason I ask is that this cold be caused by having insufficient 'MemToLeave' memory.  The storage referred to by the error message is (I'm pretty sure) memory, not disk.  This memory is used by SQL server to deal with COM objects, and these are typically created by the OA_Create and sp_xml_preparedocument procedures.  Also, third-party backup products will create com objects to make use of VDI.

In one of the systems that I support, we use XML to pass a large number of keys into a sproc.  Sometimes this XML document is very large, and I've had to increase the MemToLeave area from the default (256) to 384 or the XML prepare step will fail.

So, I don't know if you are having the same problem or same kind of problem, but if this failing procedure call is a SQL procedure that is creating COM objects then I suspect that the problem may be the MemToLeave area.

 

 

 

Post #385743
Posted Friday, July 27, 2007 6:50 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Wednesday, February 01, 2012 1:51 AM
Points: 229, Visits: 375

Jeff,

Yes, the error does display like this in the error log:

WARNING: Failed to reserve contiguous memory of Size= 131072.

Can u perhaps explain to me what MemToLeave is and how can I increase this?

 

Thanks

IC

Post #385758
Posted Friday, July 27, 2007 6:51 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Wednesday, February 01, 2012 1:51 AM
Points: 229, Visits: 375

Jeff,

Yes, the error does display like this in the error log:

WARNING: Failed to reserve contiguous memory of Size= 131072.

Can u perhaps explain to me what MemToLeave is and how can I increase this?

 

Thanks

IC

Post #385759
Posted Friday, July 27, 2007 7:57 AM


SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Sunday, February 05, 2012 2:29 PM
Points: 962, Visits: 304

Based on the existence of that additional message, my guess is that you are having the same kind of problems that I was having with the MemToLeave area.

See the "Fourth Section" in this KB document for a semi-description of MemToLeave.

http://support.microsoft.com/kb/271624/en-us

In order to increase the MemToLeave area, you need to add a startup parameter like so:

-g384

This example will increase from the default (256) to 384 MB.   The startup parameters can be adjusted in the properties page for the server in Enterprise Manager on the "general" tab.  Near the bottom of the page, there is a "startup parameters" button.

From what I've seen, most people have only changed this value on advice from PSS, and I followed no such advice.  The good news for me is that it worked.

This problem was a lot worse for me before I discovered that our XML consuming stored procedure didn't always make it to the code that released the prepared XML document.  Even after correcting that mistake, I found that I had to increase MemToLeave.

 

 

 

Post #385796
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse