question

Håkan Winther avatar image
Håkan Winther asked

SQL Log : AppDomain unloaded

Our SQL server log is filled with this message:

  • AppDomain xx (DWH_TOOLKIT.dbo[runtime].xx) created.
  • AppDomain xx (DWH_TOOLKIT.dbo[runtime].xx) unloaded.
  • AppDomain xx (DWH_TOOLKIT.dbo[runtime].xx) is marked for unload due to memory pressure.

We are using a CLR procedure to store error messages in a table, file, event log or Microsoft Operations Manager, and i suspect that it is caused by this CLR procedure.

Does anyone have a clue on how to solve this, except for adding more memory, 64Gb should be enough!!

sql-server-2008administrationclr64-bitsql-server-log
1 comment
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Just found the same problem in the errorlogs of one of our servers.
0 Likes 0 ·
John Sansom avatar image
John Sansom answered

Take a look at a blog post that I wrote, it provides the solution to your exact issue.

SQL Server Memory Configuration: Determining MemToLeave requirements

If you then have further questions then by all means please ask.

2 comments
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Good answer, good blog post! Thanks.
0 Likes 0 ·
Jonathan Kehayias avatar image
Jonathan Kehayias answered

The real question is what problem beyond these entries in the ErrorLog do you have? If you aren't getting failed_virtual_alloc problems, or other execution failures, then you probably shouldn't do anything about this. If your appdomain loads and isn't used often enough, just like everything else in SQL, it will eventually get unloaded. The -g startup parameter can be used to bump the VAS reservation in 32 bit servers, but that only goes so far to prevent the errors being logged. If the AppDomain isn't used frequently enough, it will still unload and you will still get log entries. This isn't a problem on 64 bit SQL Servers because there the VAS limit is 8TB for user mode VAS which is well beyond the physical memory limits currently available. You always have avaiable contiguous VAS on 64 bit servers so there is no VAS reservation or "MemToLeave" area. The engine doesn't even execute that block of code in 64 bit versions.

10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

payal avatar image
payal answered

Is your issue solved? if not pls let me know, i can help. dbapayal@gmail.com

10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.