windows Server 2008 IIS7 503錯誤解決方案


windows 2008 R2
在訪問的時候經常會出現503錯誤,於之前使用的是默認配置,服務器最多只能處理5000個同時請求,今天下午由於某種情況造成同時請求超過5000,下面是具體的解決方案:

 

windows 2008 R2 在訪問的時候經常會出理 503錯的解決方案

  Error Summary:

  HTTP
Error 503.2 - Service Unavailable

  The
serverRuntime@appConcurrentRequestLimit setting is being exceeded.


  Detailed Error Information:

  Module IIS Web Core


  Notification BeginRequest

  Handler StaticFile

  Error
Code 0x00000000


  由於之前使用的是默認配置,服務器最多只能處理5000個同時請求,今天下午由於某種情況造成同時請求超過5000,從而出現了上面的錯誤。


  為了避免這樣的錯誤,我們根據相關文檔調整了設置,讓服務器從設置上支持10萬個同時請求。

  具體設置如下:


  1. 調整IIS 7應用程序池隊列長度

  由原來的默認1000改為65535。

  IIS Manager
> ApplicationPools > Advanced Settings

  Queue Length : 65535


  2. 調整IIS 7的appConcurrentRequestLimit設置

  由原來的默認5000改為100000。


  c:\windows\system32\inetsrv\appcmd.exe set config
/section:serverRuntime /appConcurrentRequestLimit:100000


  在%systemroot%\System32\inetsrv\config\applicationHost.config中可以查看到該設置:


  3. 調整machine.config中的processModel>requestQueueLimit的設置


  由原來的默認5000改為100000。

  修改方法:

  Click Start and then click Run.

  1.In the Run dialog box, type notepad %systemroot%\Microsoft.Net\Framework64\v2.0.50727\CONFIG\machine.config, and then click OK.

  2.Locate the processModel element that looks like this: <processModel autoConfig="true" />

  3.Replace the processModel element with the following value: <processModel enable="true" requestQueueLimit="15000" />

  4.Save and close the Machine.config file.

  5.For Windows Server 2008, in the Run dialog box, type appcmd.exe set config /section:serverRuntime /appConcurrentRequestLimit:<#of users * 1.5>.




  參考文章:http://technet.microsoft.com/en-us/library/dd425294(office.13).aspx


  4. 修改注冊表,調整IIS 7支持的同時TCPIP連接數

  由原來的默認5000改為100000。


  reg add HKLM\System\CurrentControlSet\Services\HTTP\Parameters /v
MaxConnections /t REG_DWORD /d 100000


  完成上述4個設置,就可以支持10萬個同時請求,西西軟件服務器已經啟用上述設置。

 

轉自http://www.jb51.net/os/windows/win2008/80751.html


免責聲明!

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



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