W3wp.exe processes in Win2003 a variety of problem-solving methods that consume CPU resources _win servers

Source: Internet
Author: User
Tags access database cpu usage high cpu usage
1: Using the Microsoftjet Database engine WEB application may stop the response load, resulting in suspended animation:
Reason: This problem occurs because of a flaw in the Jet database engine. This issue only occurs on Microsoft Windows Server 2003. COM + Change frequency cofreeunusedlibraries function is invoked in Windows Server 2003. This change causes the Jet driver to initialize frequently. This behavior can result in deadlock conditions.
This problem occurs most frequently when the WEB server is loaded.
Patch Download:
Chs:windowsserver2003-kb838306-x86-chs.exe
Enu:windowsserver2003-kb838306-x86-enu.exe
Under IIS6, frequent w3wp.exe memory and CPU usage cannot be released in time, resulting in slow server response.

To resolve the memory footprint, you can configure the following:
1. Separate application pool configuration for each Web site in IIS. That does not affect each other.
2, set the application pool recovery time, the default is 1720 hours, can be modified according to the situation. Then set the memory to automatically recycle when the memory footprint is more than (500M).

Resolving Excessive CPU Usage:
1. Separate application pool configuration for each Web site in IIS. That does not affect each other.
2, set the application pool CPU monitoring, not more than 25% (server 4CPU), refresh every minute, when the limit is closed.

According to W3wp is the one application pool:
1, in the task Manager to increase the display of the PID field. You can see the process PID that takes up memory or the highest CPU
2, run iisapp-a at the command prompt. Note that the first run, will be prompted without JS support, click OK. And then you can run it again. This allows you to see the application pool that the PID corresponds to. (Iisapp is actually stored in the C:\windows\system32 directory of a VBS script, full name for Iisapp.vbs, if you and I, as well as the VBS default associated program, then you need to manually to the directory, choose to open the way, and then select " Microsoft (R) Windows Based Script Host to perform, you can get a corresponding relationship between the PID and the application pool. )
3, to IIS to see the application pool of the Web site, OK, to make the above memory or CPU restrictions, or check the program has no dead loop and so on.

QUOTE:

Environment: Win2003server+iis+asp+mssql

Phenomenon: Every once in a while (indefinite, sometimes a few minutes, sometimes half an hour) a Web site opened very slowly, and sometimes even timeout to open the site, at this point to view the server-side process, the CPU occupancy rate reached 100%, of which w3wp occupy 70~80%,sql occupied 20~30%. All server-side operations also become slow.

Initial solution: Each phenomenon occurs, immediately log on to the server directly to end the W3WP process or restart the IIS service, an average of about 10 operations per day, because the server is stored in the remote computer room, all operations are remote control, and sometimes there will be remote unable to connect to the situation, Only by telephone to the room manager to restart the server to resolve, this process caused users to complain constantly.

Through online access to data, found that most of these phenomena due to the unreasonable Web page code, the following circumstances can lead to such a phenomenon:
1, the code in many places using application, seesion, such as server caching, resulting in excessive server data consumption;
2, the code has unreasonable syntax, such as dead circulation;
3, database corruption, especially Access database;
4, install too many third-party software or Plug-ins, and IIS or Web page feature code conflict.

First-stage troubleshooting: Analysis by reference to the referenced resources
1, all site code on the server for the company's designers to write their own, can prove that there is no excessive call server caching syntax (exclusion)
2, the code whether there is unreasonable syntax (not sure)
3, according to the situation, the increase in the IIS process occupancy rate, the SQL occupancy rate increased at the same time, should be the site of the SQL database, according to the phenomenon of judgment, the library or table should be normal, estimated data may be wrong;
4, the server side in addition to the basic system services, anti-virus and web site operation of essential services, and no redundant third-party software, the probability is not (excluded).

Through the above analysis, the uncertainty is linked to the conclusion that a Web page code with SQL database has unreasonable syntax, resulting in high CPU usage of IIS and SQL processes.

The second phase of the investigation:
Determine the scope, and then continue to narrow the scope.
Since there are not many sites using SQL databases on the server, it is easy to establish a separate process ID to observe, all the sites using the SQL database in IIS Manager to establish separate application pool, and then through the CMD interface input: iisapp-aTo view and record the process ID number of each of the IIS pools, an IIS process ID is the culprit for this problem, as seen by the recurrence of multiple phenomena.

Add:
Limit the memory of SQL. Enterprise Manager--sql properties (generally local)--"Memory" tab, see the memory settings here, the maximum value to 100M bar (this does have a certain effect). There is still a lot of system resources occupied, continue to look for the cause ...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.