question

Akhtar avatar image
Akhtar asked

appdomain unloaded due to memory pressure and later failed to create appdomain

OS: Windows server 2012 R2 (64 bit) SQL: SQL server 2012 standard edition (32 bit) We are using CLR frequently(every minutes). Almost once a week our CLR gets unloaded and can't reload. As a consequence, we need to restart SQL server and then restart our service. This is not a viable solution as our service needs to be 24/7. Here are the error logs, *2015-11-11 06:00:02.06 spid15s AppDomain 2 (WapSystem.dbo[runtime].1) is marked for unload due to memory pressure. 2015-11-11 06:00:02.06 spid15s AppDomain 2 (WapSystem.dbo[runtime].1) unloaded. 2015-11-11 06:00:18.07 spid57 Failed to create AppDomain "WapSystem.dbo[runtime].2". Could not load file or assembly 'System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. Not enough storage is available to process this command. (Exception from HRESULT: 0x80070008) 2015-11-11 06:00:18.07 spid57 Error: 6517, Severity: 16, State: 1.* Here is the status of sys.dm_os_process_memory: ![alt text][1] Here are the top 20 from sys.dm_os_memory_clerks: ![alt text][2] I tried -g parameter and it didn't work. Anyone got any suggestions. Let me know if you need any further information. Thanks in advance. [1]: /storage/temp/3038-memorystatus.png [2]: /storage/temp/3039-memoryclerk.png
clr
memorystatus.png (4.8 KiB)
memoryclerk.png (35.3 KiB)
1 comment
10 |1200

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

Any chance you can switch to 64 bit sql? Could there be a memory leak in the CLR code? What value are you using with the -g parameter? Does the server take longer to reach the problem state when using -g or is it pretty much the same?
0 Likes 0 ·

0 Answers

·

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.