Sql-Server-2012

AppDomain 2 (mssqlsystemresource.dboruntime_r你n噸一世米和runtime.1) 由於 SQL Server 日誌中的記憶體壓力消息而被標記為解除安裝

  • October 15, 2020

從過去兩天開始,我可以在 SQL Server 錯誤日誌中看到以下內容。

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

我有這樣的系統環境:

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)

我已經在本地伺服器中籤出了昨天的事件日誌。我發現了這些事件

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   Error   TeamCentral Application 9/30/2015 3:16:49 PM
ABC 1309    Warning ASP.NET 4.0.30319.0 Application 9/30/2015 3:16:49 PM
ABC 1309    Warning ASP.NET 4.0.30319.0 Application 9/30/2015 3:15:43 PM
ABC 2   Error   TeamCentral Application 9/30/2015 3:15:43 PM
ABC 1010    Error   Microsoft-Windows-Perflib   Application 9/30/2015 10:42:00 AM

在事件中,我收到了這樣的消息:

   Event code: 3005 
Event message: An unhandled exception has occurred. 
Event time: 9/30/2015 4:20:41 PM 
Event time (UTC): 9/30/2015 1:20:41 PM 
Event ID: 72c24cb89beb4d7f80bec250aaa686e3 
Event sequence: 757 
Event occurrence: 17 
Event detail code: 0 

Application information: 
   Application domain: /XX/XXXX/1/ROOT/TeamCentral-2-130850431401577570 
   Trust level: Full 
   Application Virtual Path: /TeamCentral 
   Application Path: C:\XXXX\wwwroot\TeamCentral\ 
   Machine name: ABC

Process information: 
   Process ID: 2180 
   Process name: w3wp.exe 
   Account name: NT AUTHORITY\NETWORK SERVICE 

Exception information: 
   Exception type: HttpException 
   Exception message: The remote host closed the connection. The error code is 0x800704CD.
  at System.Web.Hosting.IIS7WorkerRequest.RaiseCommunicationError(Int32 result, Boolean throwOnDisconnect)
  at System.Web.Hosting.IIS7WorkerRequest.ExplicitFlush()
  at System.Web.HttpResponse.Flush(Boolean finalFlush, Boolean async)
  at System.Web.HttpWriter.WriteFromStream(Byte[] data, Int32 offset, Int32 size)
  at DevExpress.Web.ASPxClasses.Internal.HttpUtils.WriteFileToResponse(Page page, MemoryStream stream, String fileName, Boolean saveAsFile, String fileFormat, String contentType)
  at DevExpress.Web.ASPxClasses.Internal.HttpUtils.WriteFileToResponse(Page page, MemoryStream stream, String fileName, Boolean saveAsFile, String fileFormat)
  at DevExpress.Web.ASPxGridView.Export.ASPxGridViewExporter.WriteToResponse(String fileName, Boolean saveAsFile, String fileFormat, ExportToStream getStream, ExportOptionsBase options)
  at DevExpress.Web.ASPxGridView.Export.ASPxGridViewExporter.WriteXlsxToResponse(String fileName, Boolean saveAsFile)
  at DevExpress.Web.ASPxGridView.Export.ASPxGridViewExporter.WriteXlsxToResponse(String fileName)
  at InfoArch.Web.Grid.ExportHelper.Response(ExportFileType fileType, Grid structure)
  at InfoArch.Web.Grid.GridManager.SaveToXlsx(String filename)
  at System.Web.UI.WebControls.ImageButton.OnClick(ImageClickEventArgs e)
  at System.Web.UI.WebControls.ImageButton.RaisePostBackEvent(String eventArgument)
  at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)



Request information: 
   Request URL: http://ABC/TeamCentral/Reporting/GridView.aspx?layoutid=38&mf=report&where=&description=PZF6Q0PKJzWQDHkN08mydZNuJ3fZ(:#cd6TgCAL0hv4u4=&screenheight=618 
   Request path: /TeamCentral/Reporting/GridView.aspx 
   User host address:XXX.XXX.XX.XXX 
   User: rafeek 
   Is authenticated: True 
   Authentication Type:  
   Thread account name: NT AUTHORITY\NETWORK SERVICE 

Thread information: 
   Thread ID: 190 
   Thread account name: NT AUTHORITY\NETWORK SERVICE 
   Is impersonating: False 
   Stack trace:    at System.Web.Hosting.IIS7WorkerRequest.RaiseCommunicationError(Int32 result, Boolean throwOnDisconnect)
  at System.Web.Hosting.IIS7WorkerRequest.ExplicitFlush()
  at System.Web.HttpResponse.Flush(Boolean finalFlush, Boolean async)
  at System.Web.HttpWriter.WriteFromStream(Byte[] data, Int32 offset, Int32 size)
  at DevExpress.Web.ASPxClasses.Internal.HttpUtils.WriteFileToResponse(Page page, MemoryStream stream, String fileName, Boolean saveAsFile, String fileFormat, String contentType)
  at DevExpress.Web.ASPxClasses.Internal.HttpUtils.WriteFileToResponse(Page page, MemoryStream stream, String fileName, Boolean saveAsFile, String fileFormat)
  at DevExpress.Web.ASPxGridView.Export.ASPxGridViewExporter.WriteToResponse(String fileName, Boolean saveAsFile, String fileFormat, ExportToStream getStream, ExportOptionsBase options)
  at DevExpress.Web.ASPxGridView.Export.ASPxGridViewExporter.WriteXlsxToResponse(String fileName, Boolean saveAsFile)
  at DevExpress.Web.ASPxGridView.Export.ASPxGridViewExporter.WriteXlsxToResponse(String fileName)
  at InfoArch.Web.Grid.ExportHelper.Response(ExportFileType fileType, Grid structure)
  at InfoArch.Web.Grid.GridManager.SaveToXlsx(String filename)
  at System.Web.UI.WebControls.ImageButton.OnClick(ImageClickEventArgs e)
  at System.Web.UI.WebControls.ImageButton.RaisePostBackEvent(String eventArgument)
  at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)


Custom event details: 

在提出問題之前,我已經通過 Stackexchange,我發現 ref App 域由於記憶體壓力而被標記為解除安裝,但從某些角度來看,無法理解事件日誌消息。

的輸出select @@version

Microsoft SQL Server 2012 (SP1) - 11.0.3000.0 (X64) Oct 19 2012 13:38:57 版權所有 (c) Microsoft Corporation Enterprise Edition (64-bit) o​​n Windows NT 6.2 (Build 9200:) (Hypervisor)

和輸出 exec sp_configure

Name                    minimum     maximum      config_value     run_value 
max server memory (MB)   128        2147483647    2147483647     2147483647

任何建議將不勝感激。

在不打折@Shanky 的回答中所述的任何內容的情況下,應該注意正在解除安裝的特定 AppDomain 位於[mssqlsystemresource]數據庫中。這是一個儲存內置 SQL Server 功能的內部數據庫。其他內置功能駐留在[master]數據庫中。即使關閉了“CLR Enabled”的伺服器級配置選項,如果您使用以下任何一種,您仍然可以看到這些 AppDomain 中的一個或兩個正在載入(並且可能還有其他 CLR 的內部使用不在此列表):

  • 數據類型:

    • 層次 ID
    • 地理
    • 幾何學
  • 職能:

    • 格式
    • TRY_CONVERT
    • TRY_PARSE
  • 特徵:

    • 變更數據擷取
    • 動態管理框架
    • 複製
    • 基於策略的管理

執行以下命令:

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

如果沒有返回行,則執行以下命令:

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

您現在應該會看到“master.sys”的條目

$$ runtime $$.xx”(其中xx是某個數字),但仍然沒有載入程序集。現在執行:

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

您現在應該也看到一個載入的程序集。它應該是 assembly_id 1,這是所有數據庫中的相同條目:Microsoft.SqlServer.Types. 如果您執行,此程序集會顯示在所有數據庫中SELECT * FROM sys.assemblies;,但它只是真正存在於[master].

引用自:https://dba.stackexchange.com/questions/116688