Could you please help me in getting rid over following error that I am getting :-
Details of the server are as below :-
It’s a SCCM server.
SQL 2008 SP2 64 Bit.
Microsoft SQL Server 2008 (SP2) - 10.0.4272.0 (X64)
Total Physical Memory – 6GB
This is not an error.. This is information, that there was a memory pressure on the server and therefore the server unloaded mentioned app domain to free some memory. When app domains is unloaded, then all the memory associated with it is feed. Then app domain was recreated.
This frequently happen when inside CLR method a is allocated a big amount of sequential memory like very big arrays etc. Then SQL server ofter reload the app domain to free up the memory.
Mostly you can avoid this by rewriting the CLR code to better work with memory.. Do not use big arrays etc.
Are you aware that SQL CLR uses memory from the MemToLeave section of the processes address space? That is basically a section which does not get used for the buffer pool, and is where 'external' objects get their memory from (i.e. extended procs - old style, CLR etc).
It's possible that you simply don't have enough space in that area, but without being there it's difficult to get a feel for it. My advice to you would be to search for 'SQL Server CLR MemToLeave' and read up on how it works, and how you might want to set it.
Do exercise caution, however, because you are effectively saying 'don't cache data into this bit of memory' which will have an adverse affect on performance.
answered Apr 05, 2011 at 04:39 AM
Matt Whitfield ♦♦