HiveBrain v1.2.0
Get Started
← Back to all entries
patternMinor

AppDomain 2 (mssqlsystemresource.dbo[runtime].1) is marked for unload due to memory pressure message in SQL Server Log

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
duelogsqlpressuremessageruntimeappdomaindbounloadmarked

Problem

From last two days I can see following in SQL Server errorlog.

AppDomain 2 (mssqlsystemresource.dbo[runtime].1) unloaded.
&
AppDomain 2 (mssqlsystemresource.dbo[runtime].1) is marked for unload due to memory pressure.


I have system environment like this :

OS- microosft windows server 2012 R2 Standard
processors - Intel(R) Xeon(R) CPU E5-2670 0 @2.60 GHz
Installed Memory (RAM) - 8GB
Hardware Information - VMWare, Inc. VMware Virtual Platform
SQL Server - Microsoft SQL Server Enterprise (64-bit)


I have checked out in local server for yesterday's event log . I have found thses events

```
Server Name ID Severity Source Log Date and Time
ABC 1008 Error Microsoft-Windows-Perflib Application 10/01/2015 2:21
ABC 2 Error TeamCentral Application 9/30/2015 4:20:41 PM
ABC 1309 Warning ASP.NET 4.0.30319.0 Application 9/30/2015 4:20:41 PM
ABC 10016 Error Microsoft-Windows-DistributedCOM System 9/30/2015 4:06:23 PM
ABC 10016 Error Microsoft-Windows-DistributedCOM System 9/30/2015 4:00:04 PM
ABC 10016 Error Microsoft-Windows-DistributedCOM System 9/30/2015 4:00:02 PM
ABC 2 Error TeamCentral Application 9/30/2015 3:55:13 PM
ABC 1309 Warning ASP.NET 4.0.30319.0 Application 9/30/2015 3:55:13 PM
ABC 10016 Error Microsoft-Windows-DistributedCOM System 9/30/2015 3:40:06 PM
ABC 10016 Error Microsoft-Windows-DistributedCOM System 9/30/2015 3:40:03 PM
ABC 1309 Warning ASP.NET 4.0.30319.0 Application 9/30/2015 3:23:54 PM
ABC 2 Error TeamCentral Application 9/30/2015 3:23:54 PM
ABC 2 Error TeamCentral Application 9/30/2015 3:22:48 PM
ABC 1309 Warning ASP.NET 4.0.30319.0 Application 9/30/2015 3:22:48 PM
ABC 2 Error TeamCentral Application 9/30/2015 3:21:43 PM
ABC 1309 Warning ASP.NET 4.0.30319.0 Application 9/30/2015 3:21:43 PM
ABC 2 Error TeamCentral Application 9/30/2015 3:18:24 PM
ABC 1309 Warning ASP.NET 4.0.30319.0 Application 9/30/2015 3:18:24 PM
ABC 2

Solution

Without discounting anything stated in @Shanky's answer, it should be noted that the specific AppDomain being unloaded is in the [mssqlsystemresource] database. This is an internal database that stored built-in SQL Server functionality. Other built-in functionality resides in the [master] database. Even with the server-level configuration option of "CLR Enabled" turned off, you can still see one or both of these AppDomains being loaded if you use any of the following (and there could be other internal uses of CLR that are not in this list):

  • Datatypes:



  • HierarchyID



  • Geography



  • Geometry



  • Functions:



  • FORMAT



  • TRY_CONVERT



  • TRY_PARSE



  • Features:



  • Change Data Capture



  • Dynamic Management Framework



  • Replication



  • Policy-Based Management



Run the following:

SELECT * FROM sys.dm_clr_appdomains;
SELECT * FROM sys.dm_clr_loaded_assemblies;


If no rows returned, then run the following:

SELECT FORMAT(GETDATE(), 'dd');
SELECT * FROM sys.dm_clr_appdomains;
SELECT * FROM sys.dm_clr_loaded_assemblies;


And you should now see an entry for "master.sys[runtime].xx" (where the xx is some number), but still no loaded assemblies. Now run:

DECLARE @Test [HierarchyID];
SET @Test = '/1/';
SELECT * FROM sys.dm_clr_appdomains;
SELECT * FROM sys.dm_clr_loaded_assemblies;


And you should now see a loaded assembly as well. It should be assembly_id 1 and that is the same entry in all databases: Microsoft.SqlServer.Types. This assembly shows up in all databases if you run SELECT * FROM sys.assemblies;, but it only truly lives in [master].

Context

StackExchange Database Administrators Q#116688, answer score: 7

Revisions (0)

No revisions yet.