Because ASP. NET Processing Process in machine. the configuration in the config configuration file is <processModel autoConfig = "true"/>, which means your ASP. the performance parameters used by the. NET application depend on machine. config.
The following parameters are automatically configured:
1. maxWorkerThreads and maxIoThreads
2. minFreeThreads and minLocalRequestFreeThreads
3. minWorkerThreads
4. maxconnection
5. 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 the request to stop the response or "Suspend") or it may take 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
The Machine. config file can be adjusted as follows to best solve these problems:
◆ MaxWorkerThreads
◆ MinWorkerThreads
◆ MaxIoThreads
◆ MinFreeThreads
◆ MinLocalRequestFreeThreads
◆ Maxconnection
◆ ExecutionTimeout
To successfully resolve these problems, follow these steps:
◆ Limit the number of ASP. NET requests per CPU at the same time to about 12.
◆ Allow 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. The above describes the configuration of ASP. NET applications dependent on machine. config.
- Microsoft released multiple function updates for ASP. net mvc 2 preview Edition
- ASP. NET Server custom control security guidelines
- Analysis of ASP. NET programming standards and Their encoding specifications
- Introduction to ASP. NET sessions
- ASP. NET programming tool ASP. NET Web Matrix