In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
In this issue, the editor will bring you about the configuration of relying on machine.config in ASP.NET applications. The article is rich in content and analyzed and described from a professional point of view. I hope you can get something after reading this article.
Because the ASP.NET processing process is configured in the machine.config configuration file as
< processModel autoConfig="true" />Which means that the performance parameters used by your ASP.NET application depend on the configuration of machine.config
The following parameters are automatically configured:
1. MaxWorkerThreads and maxIoThreads
2. MinFreeThreads and minLocalRequestFreeThreads
3. MinWorkerThreads
4. Maxconnection
5. ExecutionTimeout
These parameters will be related to the symptoms of your application "contention, performance degradation, and deadlock when making Web service requests from ASP.NET applications":
From ASP.NET applications, you may encounter contention, performance degradation, and deadlocks when invoking XMLWeb services. The customer may report that the request has stopped responding (or "suspended") or may take a long time to execute. If death is suspected, the helper process may be reclaimed. The following message may be received in the application event log.
If you use MicrosoftInternet Information Services (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 PM
◆ User: N/A
◆ Computer:
◆ 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 PM
◆ User: N/A
◆ Computer:
◆ Description:
ISAPI'C:\ Windows\ Microsoft.net\ Framework\ v.1.1.4322\ aspnet_isapi.dll' reported itself as
Unhealthy for the following reason: 'Deadlock 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 PM
◆ User: N/A
◆ Computer:
◆ Description:
A process serving application pool 'DefaultAppPool' exceeded time limits during shut down.
The process id was'
< xxxx>Play.
You may also receive the following exception error message when making a call to the HttpWebRequest.GetResponse method:
ô System.InvalidOperationException does not have enough idle thread ThreadPool objects to complete operation. ö
You may also receive the following exception error message in the browser:
Request timing out. ö ô HttpException (0 x 80004005):
Note that this article also applies to applications that make HttpWebRequest requests directly.
Reason
This problem can occur because of the worker thread and completion port thread of ASP.NET, the call can be used to execute the request limit.
Calls to Web services typically use a worker thread to execute code to send requests and a completion port thread to receive callbacks from the Web service. However, if a request is redirected or authentication is required, the call may use up to two auxiliary and two completion port threads. When multiple Web service calls occur at the same time, you can consume managed ThreadPool.
For example, suppose ThreadPool is limited to maxworkerthreads, 10, and all 10 worker threads currently executing are waiting for a callback to execute code. Callbacks are never performed because work items are queued with ThreadPool blocking threads until they are available.
Other potential source contention is the maxconnection parameter, and the System.Net namespace is used to limit the number of connections. This restriction usually works as expected. However, if many applications try to bring many requests to a single IP address at the same time, the thread may need to wait for an available connection.
Solution
To solve these problems in the Machine.config file that best suits your situation, adjust the following parameters:
◆ maxWorkerThreads
◆ minWorkerThreads
◆ maxIoThreads
◆ minFreeThreads
◆ minLocalRequestFreeThreads
◆ maxconnection
◆ executionTimeout
To resolve these issues successfully, follow these steps:
◆ limits the number of ASP.NET requests executed simultaneously to about 12 per CPU.
◆ allows Web service callbacks to be used for free threads in ThreadPool.
◆ selects an appropriate value for the maxconnections parameter. Based on the IP address you choose and the number of AppDomains usage.
Note: it is a bit arbitrary to recommend limiting the number of 12 ASP.NET requests per CPU. However, this limitation has proved to be suitable for most applications.
This is how the configuration of relying on machine.config in the ASP.NET application shared by the editor is like. If you happen to have similar doubts, you might as well refer to the above analysis to understand. If you want to know more about it, you are welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.