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!!

more ▼

asked Nov 19, 2009 at 10:12 AM in Default

avatar image

Håkan Winther
16.6k 37 46 58

Just found the same problem in the errorlogs of one of our servers.

Jun 30, 2010 at 02:53 AM ThomasRushton ♦♦
(comments are locked)
10|1200 characters needed characters left

3 answers: sort voted first

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.

more ▼

answered Nov 19, 2009 at 10:19 AM

avatar image

John Sansom
897 2 4

Good answer, good blog post! Thanks.

Jun 30, 2010 at 02:52 AM ThomasRushton ♦♦
Aug 13, 2012 at 06:36 AM eghetto
(comments are locked)
10|1200 characters needed characters left

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.

more ▼

answered Dec 06, 2009 at 01:19 AM

avatar image

Jonathan Kehayias
293 1 3 6

(comments are locked)
10|1200 characters needed characters left

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

more ▼

answered Mar 03, 2010 at 05:34 PM

avatar image


(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

SQL Server Central

Need long-form SQL discussion? SQLserverCentral.com is the place.



asked: Nov 19, 2009 at 10:12 AM

Seen: 13223 times

Last Updated: Aug 13, 2012 at 06:36 AM

Copyright 2018 Redgate Software. Privacy Policy