locked
Error: .NET Framework execution was aborted by escalation policy because of out of memory RRS feed

  • Question

  • Hi,

    For the past few days we have been getting this error consistently between 3.00 & 3.20 AM
     
    2012-03-26 03:14:14.11 spid58      Error: 6532, Severity: 16, State: 48.
    2012-03-26 03:14:14.11 spid58      .NET Framework execution was aborted by escalation policy because of out of memory.

    We have a 2 node cluster running Windows server 2008 64 bit and SQL Server 2005 64 bit Build 9.0.5000. The total memory on the server is 64 GB and the SQL server is capped at 58 GB. Absolutely nothing changed on this server and this is the memory distribution of SQLCLR on the server.

    type     VM Reserved VM Committed AWE Allocated SM Reserved SM Committed MultiPage Allocator SinlgePage Allocator
    MEMORYCLERK_SQLCLR 12639104 657960  0  0  0  82328   3336

    It is worth mentioning that our backup jobs kick start at 3.00 AM but it has been this way for ever and we never faced this issue earlier.

    DBCC MEMORYSTATUS info looks good to me (I will be glad to share it if needed). Can someone please provide more information on this error?

    Monday, March 26, 2012 7:57 AM

Answers

  • Hi OldSQLBee,

    -- Check whether you have granted "Lock Pages in Memory" SQL Server service account

    -- Monitor "# Bytes in all Heaps" counter under ".NET CLR Memory" for the following instances:
    sqlservr
    SQLAGENT90
    MsDtsSrvr (Depending on whether you run SSIS)
    (_Global_) (To get the sum of all memory usage)

    If this number is very low throughout the captured period that has the error message, it means that SQL CLR is not  the
    the cause of memory pressure.  it is simply responding to system memory pressure.

    At this point, you need look other causes of memory pressure on the system

    -- Check whether File System Cache is eating more memory since in x64 VAS is higher than RAM, File System cache may grow causing working set trimming in other applications. Refer http://support.microsoft.com/default.aspx?scid=kb;EN-US;976618 for more info

    -- Reduce the size of 'max server memory'.  CLR memory consumption comes outside of buffer pool.  If 'max server memory' is not configured, configure it so that it give enough memory for CLR

    -- Since this is a Windows 2008 OS, I would recommend you to apply http://support.microsoft.com/default.aspx?scid=kb;EN-US;971442

    -- You can also apply the latest hotfix related to .NET Framework 2.0 Service Pack 2 - http://support.microsoft.com/?id=961870

    If nothing helps, you may collect dump using the commands below and send to Microsoft PSS:
    dbcc traceon(2551,-1)
    dbcc dumptrigger on error 10311 (dbcc dumptrigger ('set', 10311)) to get a dump.


    Cheeeeerrzzzz!
    S@kthi
    http://blogs.msdn.com/sqlsakthi | http://twitter.com/PowerSakthi

    Mark as Answer if it helps. This posting is provided "AS IS" with no warranties and confers no rights.

    • Marked as answer by Iric Wen Tuesday, April 3, 2012 5:48 AM
    Thursday, March 29, 2012 9:28 AM

All replies

  • Try reduce MAX memory [parameter value lower  to under 50 or something

    Do you run CLR procedure? http://support.microsoft.com/kb/928083


    Best Regards, Uri Dimant SQL Server MVP http://dimantdatabasesolutions.blogspot.com/ http://sqlblog.com/blogs/uri_dimant/

    Monday, March 26, 2012 8:04 AM
    Answerer
  • Thanks for your response Uri.

    Yes we do use CLR procedures but the interesting fact is that none of them changed and i am very sure about it. Also what I am failing to understand is why do we receive this error. To the best of my knowledge on my server the NON-BUFFERPOOL region is being used only by CLR ( I do not have linked servers nor any other extended SP's ) and there is no fragmention in this section of memory as well.

    Sure i will test the server by lowering the MAX SERVER MEMORY Setting.

    Regards

    -FR


    • Edited by OldSQLBee Monday, March 26, 2012 8:16 AM text error
    Monday, March 26, 2012 8:15 AM
  • Various memory errors are logged to SQL Server error log when using SQL CLR objects
    Memory Usage in SQL CLR

    Best Regards, Uri Dimant SQL Server MVP http://dimantdatabasesolutions.blogspot.com/ http://sqlblog.com/blogs/uri_dimant/

    • Proposed as answer by Iric Wen Tuesday, April 3, 2012 5:49 AM
    Monday, March 26, 2012 8:17 AM
    Answerer
  • Hi OldSQLBee,

    -- Check whether you have granted "Lock Pages in Memory" SQL Server service account

    -- Monitor "# Bytes in all Heaps" counter under ".NET CLR Memory" for the following instances:
    sqlservr
    SQLAGENT90
    MsDtsSrvr (Depending on whether you run SSIS)
    (_Global_) (To get the sum of all memory usage)

    If this number is very low throughout the captured period that has the error message, it means that SQL CLR is not  the
    the cause of memory pressure.  it is simply responding to system memory pressure.

    At this point, you need look other causes of memory pressure on the system

    -- Check whether File System Cache is eating more memory since in x64 VAS is higher than RAM, File System cache may grow causing working set trimming in other applications. Refer http://support.microsoft.com/default.aspx?scid=kb;EN-US;976618 for more info

    -- Reduce the size of 'max server memory'.  CLR memory consumption comes outside of buffer pool.  If 'max server memory' is not configured, configure it so that it give enough memory for CLR

    -- Since this is a Windows 2008 OS, I would recommend you to apply http://support.microsoft.com/default.aspx?scid=kb;EN-US;971442

    -- You can also apply the latest hotfix related to .NET Framework 2.0 Service Pack 2 - http://support.microsoft.com/?id=961870

    If nothing helps, you may collect dump using the commands below and send to Microsoft PSS:
    dbcc traceon(2551,-1)
    dbcc dumptrigger on error 10311 (dbcc dumptrigger ('set', 10311)) to get a dump.


    Cheeeeerrzzzz!
    S@kthi
    http://blogs.msdn.com/sqlsakthi | http://twitter.com/PowerSakthi

    Mark as Answer if it helps. This posting is provided "AS IS" with no warranties and confers no rights.

    • Marked as answer by Iric Wen Tuesday, April 3, 2012 5:48 AM
    Thursday, March 29, 2012 9:28 AM
  • This works for me bruh. I'm querying in spatial. Thanks.
    • Edited by Dexdex Tuesday, January 8, 2019 9:11 AM
    Tuesday, January 8, 2019 9:11 AM