MS SQL錯誤:SQL Server failed with error code 0xc0000000 to spawn a thread to process a new login or connection. Check the SQL Server error log and the Windows event logs for information about possible related problems


      早晨寧波那邊的IT人員打電話告知數據庫無法訪問了。其實我在早晨也發現Ignite監控下的寧波的數據庫服務器出現了異常,但是當時正在檢查查看其它服務器發過來的各類郵件,還沒等到我去確認具體情況,就收到了電話。我首先檢查網絡是否暢通,結果發現網絡沒有問題,然后遠程登錄到該服務器,查看了一下數據庫的服務發現其運行正常,但是在本機使用MSSMS管理工具亦無法連接數據庫,當下有兩種方案:方案一:使用DAC登錄數據庫,檢查具體情況,方案二:直接去查看錯誤日志,查看具體錯誤信息。於是為了快點找到原因。我選擇了去查看錯誤日志(C:\Program Files\Microsoft SQL Server\MSSQL.2\MSSQL\LOG)。

clipboard

日期 2014/3/4 8:51:52

日志 SQL Server (存檔編號3 - 2014/3/4 8:55:00)

源 Logon

消息

SQL Server failed with error code 0xc0000000 to spawn a thread to process a new login or connection. Check the SQL Server error log and the Windows event logs for information about possible related problems. [CLIENT: xxx.xxx.xxx.xxx]

在網上搜索了一下發現: This problem occurs because the Windows operating system pages out the working set of the SQL Server process.Means sql server needed more memory for that but showing less for  a process..

因為這台服務器是Windows Server 2003 Stanard 32bit , 物理內存4G,內存一直比較吃緊,本來計划遷移到新服務器,但是由於各種原因一直沒有實施。 於是我重啟了SQL Server 服務后,發現問題解決了。繼續查找錯誤日志記錄中最早出現“Error: 17189, Severity: 16, State:1"的時間點,發現是在早晨2014/3/4  8:02:49, 在此之前出現了

”AppDomain 4(YourSQLDba.dbo[runtime].3) is marked for unload due to memroy pressure

clipboard[1]

SQL  Server Agent有如下錯誤信息:

clipboard[2]

關於這個問題, http://www.nullskull.com/q/10143638/error--17189.aspx 這里做了詳細的介紹。

  1. To resolve the known issues that cause the Windows operating system to page out the working set of the SQL Server process, apply the hotfixes that are described in the following Microsoft Knowledge Base articles.
    Note Hotfixes are cumulative. A later version of a hotfix contains the earlier versions of that hotfix.
    • Microsoft has found an issue that may cause the 64-bit edition of the SQL Server working set to be trimmed. For more information, click the following article number to view the article in the Microsoft Knowledge Base:

      http://support.microsoft.com/kb/905865/  (http://support.microsoft.com/kb/905865/ ) The sizes of the working sets of all the processes in a console session may be trimmed when you use Terminal Services to log on to or log off from a computer that is running Windows Server 2003

    • Computers that are running Windows Server 2003 can be too aggressive when they cache dirty buffers if there is an application performing buffered I/O, such as a file copy operation. This behavior can cause the working set in SQL Server to be trimmed. For more information, click the following article number to view the article in the Microsoft Knowledge Base:

      http://support.microsoft.com/kb/920739/  (http://support.microsoft.com/kb/920739/ ) You may experience a decrease in overall system performance when you are copying files that are larger than approximately 500 MB in Windows Server 2003 S or in Windows Server 2003 S

    • The SQL Server working set may be trimmed when the system is using some advanced TCP features. For more information, click the following article number to view the article in the Microsoft Knowledge Base:

      http://support.microsoft.com/kb/942861/  (http://support.microsoft.com/kb/942861/ ) Error message when an application connects to SQL Server on a server that is running Windows Server 2003: "General Network error," "Communication link failure," or "A transport-level error"

    • On a multiprocessor computer that is running Windows Server 2003, the System process may consume most of the available system memory. For more information, click the following article number to view the article in the Microsoft Knowledge Base:

      http://support.microsoft.com/kb/942486/  (http://support.microsoft.com/kb/942486/ ) The System process may consume most of the available system memory on a multiprocessor computer that is running Windows Server 2003

  2. If a device driver uses the MmAllocateContiguousMemory function, and if it sets the value of the HighestAcceptableAddress parameter to less than 4 gigabytes (GB), the Windows operating system may page out the working set of the 64-bit SQL Server process. To resolve this problem, contact the vendor of the device driver for driver updates.
  3. If you still encounter these problems after you apply these hotfixes, apply a Windows hotfix that limits the number of trim operations per process. For more information, click the following article numbers to view the articles in the Microsoft Knowledge Base:

    http://support.microsoft.com/kb/938486/  (http://support.microsoft.com/kb/938486/ ) A Windows Server 2003-based computer becomes unresponsive because of a memory manager trimming operation that is caused by an indeterminate module that requests lots of memory

    http://support.microsoft.com/kb/956341/  (http://support.microsoft.com/kb/956341/ ) A Windows Server 2003-based computer becomes unresponsive because of a large memory allocation request

    When a device driver tries to allocate memory, the Windows operating system may page out the working set of other applications. This Windows hotfix lets you use event tracing to find the device driver that causes problem.

  4. Applications may use the system cache too much, and may cause a large growth of the system cache. To respond to the growth of the system cache, the system pages out the working set of the SQL Server process or of other applications. If you experience this problem, you can use some memory management functions in the application. These functions control the system cache space that file I/O operations can use in the application. For example, you can use the SetSystemFileCacheSize function and the GetSystemFileCacheSize function to control the system cache space that file I/O operations can use.
    You can use the Memory performance object to view the values of various counters in this object to determine whether the system cache working set uses too much memory. For example, you can view the Cache Bytes and System Cache Resident Bytes counters. For more information about this topic, visit the following Microsoft Web sites:

    http://blogs.msdn.com/ntdebugging/archive/2007/11/27/too-much-cache.aspx (http://blogs.msdn.com/ntdebugging/archive/2007/11/27/too-much-cache.aspx)
    http://blogs.msdn.com/ntdebugging/archive/2009/02/06/microsoft-windows-dynamic-cache-service.aspx (http://blogs.msdn.com/ntdebugging/archive/2009/02/06/microsoft-windows-dynamic-cache-service.aspx)

    You can download and deploy the "Microsoft Windows Dynamic Cache Service" to control the memory that is consumed by the system cache.

  5. If SQL Server is running together with SAP R/3, you may experience a paging issue. For more information, click the following article number to view the article in the Microsoft Knowledge Base:

    http://support.microsoft.com/kb/931308/  (http://support.microsoft.com/kb/931308/ ) You may experience increased paging to the hard disk when you run an SAP R/3 program on a Windows Server 2003-based computer

參考資料:

      http://www.nullskull.com/q/10143638/error--17189.aspx

    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/59e24094-d459-4d78-b06a-bbad77c60245/server-failed-with-error-code-0xc0000000-to-spawn-a-thread-to-process-a-new-login-or-connection?forum=sqlsetupandupgrade

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM