Contention, ???? ????????, ?? deadlocks ?? ?? ???? ASP.NET ????????? ?? ??? ???? ?? ??? ????

???? ?????? ???? ??????
???? ID: 821268 - ?? ???????? ?? ?????? ??? ?? ?? ???? ???? ???? ??.
??? ?? ??????? ???? | ??? ?? ??????? ????

?? ????? ??

?????

?? ?? ???? Microsoft ASP.NET ????????? ?? ??? ???? ?? ??? ??, ?? contention, ???? ????????, ?? deadlocks ????? ?? ???? ??? ??????? ??????? ?? ???? ?? ?? ?????? ???????? (?? "????") ?? ????? ?? ????????? ???? ?? ??? ?? ???? ???? ??? ??? ??? ??? ?????? suspected ??, ????? ????????? ??????? ?? ???? ??? ?? ????????? ????? ??? ??? ????? ????? ??????? ?? ???? ???
  • ?? ??????? ?????????? ???????? (IIS) 5.0 ?? ????? ?? ??? ???, ?? ???? ????? ????? ????????? ??? ??? ????? ??:

       Event Type:     Error
       Event Source:   ASP.NET 1.0.3705.0
       Event Category: None
       Event ID:       1003
       Date:           5/4/2003
       Time:           6:18:23 PM
       User:           N/A
       Computer:       <ComputerName>
       Description:
          aspnet_wp.exe  (PID: <xxx>) was recycled because it was suspected to be in a deadlocked state.
          It did not send any responses for pending requests in the last 180 seconds.

  • ??? ?? IIS 6.0 ?? ????? ?? ??? ???, ?? ???? ????? ????? ????????? ??? ??? ????? ??:

       Event Type:     Warning
       Event Source:   W3SVC-WP
       Event Category: None
       Event ID:       2262
       Date:           5/4/2003
       Time:           1:02:33 PM
       User:           N/A
       Computer:       <ComputerName>
       Description:
          ISAPI 'C:\Windows\Microsoft.net\Framework\v.1.1.4322\aspnet_isapi.dll' reported itself as
          unhealthy for the following reason: 'Deadlock detected'.

  • ??? ?? IIS 6.0 ?? ????? ?? ??? ???, ?? ???? ????? ????? ?????? ??? ??? ???????:

       Event Type:     Warning
       Event Source:   W3SVC
       Event Category: None
       Event ID:       1013
       Date:           5/4/2003
       Time:           1:03:47 PM
       User:           N/A
       Computer:       <ComputerName>
       Description:
          A process serving application pool 'DefaultAppPool' exceeded time limits during shut down.
          The process id was '<xxxx>'.

?? ????? ????? ?????? ?? ??????? ?? ???? ?? ?? ????? ??? ?? HttpWebRequest.GetResponse ?????? ?? ??? ????:
"System.InvalidOperationException: ???? ?? ???????? ????? ??????? ThreadPool ???????? ??? ????? ???? ?? ??? ????????."
?? ????? ????? ?????? ????? ?? ??????? ?? ???? ?? ???????? ???:
"HttpException (0x80004005): ?????? ???????? ?? ?? ????."
??? ?? ???? ?? HttpWebRequest ?????? ???? ??????????? ?? ??? ?? ???? ???? ???

????

?? ?????? ?? ???? ?? ??????? ASP.NET ?????? ?? ????? ???? ????? ????? ?? ??????? ????? ??????? ??? ????????? ???? ?? ??? ????? ?? ???? ??? ?? ?? ???????

??????????, ?? ??? ???? ??? ???? ?? ??? ?????? ????? ?? ??? ?? ????????? ???? ?? ??? ?? ????? ????? ?? ??? ???? ?? ?????? ??????? ???? ?? ??? ?? ????? ????? ????? ?? ????? ???? ??? ??? ?????? ?????????????? ?? ?? ?????????? ?? ???????? ???? ??, ???????, ??? ??? ?? ????? ????? ?? ?? ??????? ????? ??????? ????? ?? ???? ???? ?????, ?? ?? ??? ??? ?????? ??? ???? ??? ?? ???? ?? ?? ???????? ThreadPool exhaust ?? ???? ????

?????? ?? ???, ?????? ???? ?? ThreadPool 10 ????? ????? ?? ??? ????? ??, ?? ??? 10 ????? ????? ??????? ??? ????????? ???? ?? ??? ??? ?????? ?? ????????? ?? ??? ?? ?? ????????? ??? ??? ????? ?????? ?? ???? ?? ?? ?? ??? ????? ?????? ?? ThreadPool ???? ?? ??? ?????????? ??? ????? ??? ?? ??? ??????? ?????? ???, ????????? ?? ???? ????

???? ???? ??????? ????? contention ?? ?? maxconnection ???????? ?? System.Net ??? ????? ?? ????? ??????? ?? ?????? ?? ????? ???? ?? ??? ???? ??? ????? ??, ?? ???? ??????? ?? ?????? ??? ???? ??? ???????, ?? ???? ?? ??? ?? ????????? ?? ?????? ???? ??? ?????? ?? ??? ??? ??? IP ??? ?? ?? ??? ???, ??????? ?? ??? ????????? ???? ??? ???? ?? ??? ?????? ????????

????????

?? ???????? ?? ?? ???? ?? ???, ?? ???? ?????? ?? ??????? ???? ???? ?? ??? Machine.config ????? ??? ????? ???????? ????? ?? ???? ???:
  • maxWorkerThreads
  • minWorkerThreads
  • maxIoThreads
  • minFreeThreads
  • minLocalRequestFreeThreads
  • maxconnection
  • executionTimeout
??????????? ?? ???????? ?? ?? ???? ?? ???, ????? ???????? ??:
  • ?? ????????? ?? ???? ??? ?? ASP.NET ???????? ?? ?????? ?? ????? ???? ????? CPU 12 ???? ?? ??? ?? ?? ??? ???
  • ??? ???? ????? ????? ??? ??? ThreadPool ??????? ?? ????? ???? ?? ?????? ???
  • Maxconnections ???????? ?? ??? ??? ???? ??? ?? ??? ????? ???? ??? IP ???? ?? ?????? ?? ?????? ?? AppDomains ?? ????? ???? ???? ???
??? ?? 12 ASP.NET ???????? ?? ?????? ?? ????? ???? ?? ??? ??????? ????? CPU ????? ???? ??? ???????, ?? ???? ?? ??? ?? ??? ???? ?? ??? proved ?? ?????? ??????????

maxWorkerThreads ?? maxIoThreads

?????????? ?? ???????????? ???????? ASP.NET ?? ????? ???? ?? ????? ????? ?? ??????? ??????? ??? ?? ?? ?????? ?????? ?? ????? ???? ?? ??? ?????:
<processModel maxWorkerThreads="20" maxIoThreads="20">
??????? maxWorkerThreads ???????? ?? maxIoThreads ???????? Cpu ?? ?????? ?????? multiplied ??? ???? ?? ??? ??? ???? ??? ?? ??????????, ?????? ?? ???, ???????? ??????? ?? ?????? ?????? ?? ?????:
2 * maxWorkerThreads

minFreeThreads ?? minLocalRequestFreeThreads

ASP.NET ?? ????? ???????????? ??? ?? ????????? ????? ????? ????? ?? ??????? ????? ??????? ???????? ???? ?????? ?????? ?? ??????? ?????? ?? ???? ???? ?? ??? ?????? ???? ?????:
<httpRuntime minFreeThreads="8" minLocalRequestFreeThreads="8">
???? ?? ???????? ??????? ??????, ?????? ?? ?????????? ?? ?? ???????? ????? ?? ?????? ???? ?? ??? ???????? ???? ?????, ASP.NET ????? ?????? ?? ?????????? ?????? ?? ???? ?? ?? ??? ?? ????????? ????:
(maxWorkerThreads*Cpu ?? ??????)-minFreeThreads
??? ??????? minFreeThreads ???????? ?? minLocalRequestFreeThreads ???????? Cpu ?? ?????? ?????? multiplied ???? ????

minWorkerThreads

?? ??? ??? ASP.NET 1.1 ?? ASP.NET 1.0 ?????? ??? 3, ASP.NET ?? ??? ?? ????????? ???? ?? ?? ????? ???????????? ?????? ???? ???? ????? ????? ?????? ?????? ???? ?? ??? ?????? ??? ?? ???? ?? ???????
<processModel minWorkerThreads="1">
??????? ?? ??? ????????? ?????? ?? ?????? ??? ???? ??? ?? ?? ???? ??? ?? ?? ????? ????? CLR ?? ???????? "?????-???????? ??" ???? ?? ????????? ?? ?????? ?? ???? ?? ?? ???? ?????? ???? ?? ??? ASP.NET ????? ???? ?? ????? ?? ???? ??? ?? ?? slow-down ???? ASP.NET ?????? ?????? ???? ????? ?????? ??????? ???, ?? ???? ???? ?? ?? sudden burst ?? ???????? ?? ?????? ??? ??? sudden rise ???? ??? ?? ?????? , minWorkerThreads ???????? ?? ??? ???????? ??? 1 ??? ?? ??????? ???? ??? ?? ?? minWorkerThreads ???????? ?? ??? ??? ????? ??? ?? ??? ???
minWorkerThreads = maxWorkerThreads / 2
???????? ??? ??, minWorkerThreads ???????? ?? web. config ????? ??? ????? ???? ?? ?? Machine.config ?????? ?? ?????? ??????? ?? ?????? ?????? multiplied ?? Cpu.

maxconnection

Maxconnection ???????? ????????? ???? ?? ?? ????? ??????? ???? ?? ??? ??? ?? ???? ??? ?? ??????? IP ???? ???????? ??????????? ????? ???? ??:
<connectionManagement>
    <add address="*" maxconnection="2">
    <add address="http://65.53.32.230" maxconnection="12">
</connectionManagement>
????????? ??? ????????? ?? IP ??? ?? ???? ????? ??? ?????? ???????? ???? ???, ?? ???????? ??????????? ????? ???? ?????:
<connectionManagement>
    <add address="*" maxconnection="2">
    <add address="http://hostname" maxconnection="12">
</connectionManagement>
80 ?? ????? ??? ????? ?? ????????? ????? ???? ??? ??, ?? ????:, ???????? ????? ????? ????? ??? URI, ????? ?? ???? ??:
<connectionManagement>
    <add address="*" maxconnection="2">
    <add address="http://hostname:8080" maxconnection="12">
</connectionManagement>
???? ?? ???? ??? ???? ?? ?????????? ?? ??? ???????? ??? ????????? ???? ?? ???? ???????, maxconnection ???????? ?????? AppDomain ???? ?? ???? ???? ??? ???????? ??? ??, ?? ?????? AppDomain ???? ?? ???? ???? ??, ??????? ?? ?????? ??? ???? ??? ' % ws ' ?? ?? ??????? IP ??? ???? ?? ??? ?? ??????? ??? ???????? AppDomain ?? ???? ????????? ???

executionTimeout

ASP.NET ???? ?? ??? ????? ???????????? ?????? ?? ????? ???? ?? ?????? ???????? ??? ????:
<httpRuntime executionTimeout="90"/>
?? ?? ???? Server.ScriptTimeout ??? ?? ????? ?? ??? ?? ???? ????

???ExecutionTimeout ???????? ?? ??? ?? ?????? ???, ?? ?? ?? processModel ?? ??????? ???? ??? ???? ?? responseDeadlockInterval ???????? ?????? ???

?????????

?? ?????? ??? ???????? ???????? ?? ??? ??? ???? ?? ???? ?? ??? ?????????? ?????, ?????????? ???????? ??????? ?? ??? ?? ??? ?? ???? ?? ???? ??????? ?????

??? ?? ?? ??? ???? ?? ??? ???? ??? IP ??? ?? ???????? ASPX ????? ???? ???, Microsoft ??????? ???? ?? ?? ?? ????? ???????????? ???????? ?? ????? ????:
  • 100?? ??? maxWorkerThreads ???????? ?? maxIoThreads ???????? ?? ??? ??? ?????
  • ?? ??? maxconnection ???????? ?? ??? ?? ??? ???? 12 *N (???? N Cpu ?? ?????? ?? ?? ???? ??? ???)?
  • ' % Ws ' ?? minFreeThreads ???????? ?? ??? ??? ??? ???? 88 *N ?? minLocalRequestFreeThreads ???????? ?? ???76 *N.
  • ??? ???? minWorkerThreads50???? ?? ??? ?? ???? ??? ????, minWorkerThreads ???????? ??? ?? ???????????? ????? ??? ???? ??? ???? ??? ?????? ?????
??? ?? ?????????? ?? ???? involves ?? ?????? ????? ????? ??? ???? ????? ?? Cpu ??? ??? Cpu ?? ?????? ?? ???????????? ???? ???? ?? ????? ?? N. ????????????? ????? ???? ??? ??, ?? ?? ???????? ?? ???, ?? ??????? Cpu ?? ?????? ????? Cpu ?? ?????? ?? ????? ?? ????? ???? ?????? ????????????? ?? ????? ?? ??? ?? ???-???????? ????? ??, ?? ?????? ?? ???, ?? ??? N4?? ???? 8 ??????? ??? ???? ??????

??? ?? ?? ?? ???????????? ?? ????? ???? ???, ?????? 12 ????????? ?? ???? ??? ASP.NET ?????? CPU ????? ?? ??? ??? ??????? 100-88 = 12. ?????, ?? ?? ?? 88 *N ???????? ????? ?? 88 *N ??????? ????? ??????? ??? ????? ?? ??? ?????? (???? ??? ???? ????? ???????) ???? ???

?????? ?? ???, ??? ?? ???? ????? ?? ??? ???????? ?? ????????????? ?? ????? ???? ??? ??? ?? ????? ?? ??????, ?? ????? ??? ?? ??? ????? ?????? ?? ???? ??? ???????? ???????????? ?????????
<system.web>
	<processModel maxWorkerThreads="100" maxIoThreads="100" minWorkerThreads="50"/>
	<httpRuntime minFreeThreads="704" minLocalRequestFreeThreads="608"/>
</system.web>

<system.net>
	<connectionManagement>
		<add address="[ProvideIPHere]" maxconnection="96"/>
	</connectionManagement>
</system.net>

?? ?? ?? ???????????? ?? ????? ???? ???, ??? ??, 12 ??????? ?????? ???? ?? IP ??? ?? ??? ???????? AppDomain ????? ????? CPU. ?????, ??? ????? ?? ?????? ?? ??? ????????? ?? ??? ???, ?????? ???? ?? contention ???? ?? ?????? ???? ?? ??????? ?? ThreadPool ?? ???? ????:
  • ??? (AppDomain) ???? ?? ????????? ?? ????? ???? ???
  • ??? ASPX ????? ?? ??? ???????? ?????? ?? ??? ???? ?????? ????? ???
  • ??? ?????? ???? ?? ??? ???? IP ??? ????
?? ?? ?? ???????????? ?? ????? ???? ???, ???????, ???????? ?? ????? ????? ??? ?? ?? ???? ???? ???? ??????? ?? ????? ?????:
  • ?????? ???? ?? ??? ?? ?? ???? IP ??? ????
  • ?????? ?? ?????????????? (302 ?????? ???) ????
  • ?????? ?????????? ?? ???????? ???? ???
  • ?????? ?? ???? AppDomains ??? ???? ????
?? ???????? ???, ?? ?? ?? ??? ?? ??? ????? ???? ?? ??? ?? ????? ????? ?? maxconnection ???????? ?? minFreeThreads ???????? ?? minLocalRequestFreeThreads ???????? ?? ??? ???? ????

??????

?? ??????? ??????? ?? ?????? ???

???? ???????

??? ?? ???? ???????? ?? ASP.NET ?? ??? IIS 7.0 ?? contention ?? ????? ?? ??? ???, ?? ????? Microsoft ????? ?? ????:
ASP.NET ????? ????? IIS 7.5, IIS 7.0 ?? IIS 6.0 ??

IIS 7.0 ??? ASP.net ????

??????

???? ??????? ?? ???, ????? Microsoft ?????? ??????? (MSDN) ??? ???? ?? ????:
ASP.NET ??????????? ???????

???

???? ID: 821268 - ????? ???????: 06 ????? 2013 - ??????: 3.0
???? ???? ???? ??:
  • Microsoft .NET Framework 2.0
  • Microsoft ASP.NET 1.1
  • Microsoft ASP.NET 1.0
??????: 
kbprb kbmt KB821268 KbMthi
???? ?????? ????????
??????????: ?? ???? ?? ???? ??????? ?? ????? ?? Microsoft ????-?????? ?????????? ?????? ?????? ???? ??? ??. Microsoft ???? ??? ????-???????? ?? ????-???????? ????? ?????? ?? ???? ???????? ???? ?? ???? ????? ????? ??? ?? ??? ?????? ?? ???? ???? ???? ??? ????? ??. ???????, ????-???????? ???? ????? ???? ???? ???? ???. ?????, ????????, ?????-???? ?? ??????? ?? ???????? ?? ???? ???, ???? ?? ??? ?????? ???? ???? ??? ????? ??? ?? ???? ??. Microsoft ??????? ??? ???? ?? ?????? ?? ??????????, ????????? ?? ??? ?????? ?? ???? ????? ?? ???? ???????? ?? ??? ???? ????? ?? ??? ????????? ???? ??. Microsoft ????-?????? ?????????? ?? ????? ?????? ?? ?? ??? ??.
?????????? ?? ??????? ????????? ??????? ??:821268

??????????? ???

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com