Because the Asp.net processing process is in the machine. the configuration in the config configuration file is <processmodel AutoConfig = "true"/>, which means that the performance parameters used by your Asp.net application depend on machine. config.
The following parameters are automatically configured:
- Maxworkerthreads and maxiothreads
- Minfreethreads and minlocalrequestfreethreads
- Minworkerthreads
- Maxconnection
- Executiontimeout
These parameters are related to the symptoms of your application: "contention, performance degradation, and deadlocks when web service requests are made from ASP. NET Applications ":
From the ASP. NET application, when calling the xmlweb service, contention, performance degradation, and deadlock may occur. The customer may report that the request is stopped (or "suspended") or takes a long time to execute. Suspicious processes may be recycled. The following message may be received in the Application Event Log. • If you use Microsoft Internet Information Service (IIS) 5.0, you will receive the following message in the Application Event Log:
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
User: N/
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.
• If you use IIS 6.0, you will receive the following message in the Application Event Log:
Event Type: Warning
Event Source: W3SVC-WP
Event category: None
Event ID: 2262
Date: 5/4/2003
Time: 1:02:33
User: N/
COMPUTER: <computername>
Description:
ISAPI 'C: \ windows \ microsoft.net \ framework \ v.1.1.4322 \ aspnet_isapi.dll 'reported itself
Unhealthy for the following reason: 'destlock detected '.
• If you use IIS 6.0, you will receive the following message in the System Event Log:
Event Type: Warning
Event Source: w3svc
Event category: None
Event ID: 1013
Date: 5/4/2003
Time: 1:03:47
User: N/
COMPUTER: <computername>
Description:
A process serving application pool 'defaultapppool 'exceeded time limits during shut down.
The process ID was '<XXXX> '.
You may receive the following error message when calling the httpwebrequest. getresponse method:
Using system. invalidoperationexception Is Not Enough idle thread threadpool object to complete operation. ömedium:
You may also receive the following error message in your browser:
Request timed out. öw.httpexception (0x80004005 ):
Note that this article also applies to HTTP webrequest requests directly by applications.
Cause
This problem may occur when you call the auxiliary thread of ASP. NET and the completion port thread to limit the number of requests.
For Web service calls, a helper thread is usually used to execute code to send requests and a completion port thread to receive callbacks from the web service. However, if the request is redirected or requires verification, the call may use up to two auxiliary and two complete port threads. When multiple web service calls occur at the same time, you can consume the managed threadpool.
For example, if threadpool is limited to maxworkerthreads and 10, all 10 worker threads are currently waiting for the callback to execute the code. Since the work item Queues with threadpool, callback can be never executed before the thread is available.
Other potential source contention is the maxconnection parameter, and the system. Net namespace is used to limit the number of connections. This restriction generally works as expected. However, if many applications attempt to send multiple requests to a single IP address, the thread may have to wait for an available connection.
Solution
To solve these problems, you can adjust the following parameters: • maxworkerthreads
• Minworkerthreads
• Maxiothreads
• Minfreethreads
• Minlocalrequestfreethreads
• Maxconnection
• Executiontimeout
To successfully resolve these problems, follow these steps: • Limit the number of ASP. NET requests executed at a time of about 12 per CPU.
• Allows the Web Service callback to be used for free threads in the threadpool.
• Select an appropriate value for the maxconnections parameter. Based on the selected IP address and the number of AppDomains.
Note: It is recommended to limit the number of ASP. NET requests per CPU 12. However, this restriction proves to be applicable to most applications.
See: http://support.microsoft.com/Default.aspx? Id = 821268