W3wp.exe process consumes too much memory resolution _win server

Source: Internet
Author: User
Tags cpu usage

W3wp.exe is a process associated with an application pool in IIS (Internet Information Server), and if you have multiple application pools, there will be multiple W3wp.exe process instances running. This process is used to allocate a large amount of system funding

Today, the following configuration can be done:

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. Also, set the number of W3WP processes running concurrently to 1. Then set the memory to automatically recycle when memory or CPU usage is more or less

In general, this can be solved. However, there will still be individual Web sites due to procedural problems, can not be properly released.

So, how can we find out which site is?

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. So you can see the PID's corresponding application pool.

3, in IIS to see the application pool corresponding to the site, OK.

Recently, the company server has always been cpu100% occupied, the server is configured as dual-core xeon3.0x2,2g ECC memory.

The discovery is that w3wp.exe takes up a large amount of CPU for a long time. This situation should be caused by the death cycle of the website program.

You can temporarily limit the w3wp process CPU usage before you find a problem to ensure that the site can work:

Under IIS6, frequent w3wp.exe memory and CPU usage cannot be released in time, resulting in slow server response.

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.

Which application pool is obtained according to W3WP:

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:windowssystem32 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.

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).

My setup is as follows:

The first is the CPU limit: After CPU monitoring is enabled, I set the maximum CPU usage for this application pool to 50%. Set the refresh CPU time to 1 minutes and set the operation to "off". The maximum number of worker processes is set to 1. This means that the IIS refresh detects the CPU usage of the stand-alone pool for 1 minutes, and if the CPU limit of 50% is exceeded, an instruction is issued to turn off the pool, requiring the pool to shut down within a specified period of time. If the pool is successfully closed at this time, IIS restarts a new pool, which is very short and generally does not feel the same, the pool is reopened, and the people who visit the site basically will not feel. However, if the pool is not closed within a specified time, IIS will force it to shut down a flush CPU time. In this stop time, the website is unable to access, prompt "Service unavaliable".

Shutdown time and start interval settings: Set for a short period of time, such as 10 seconds, so that when your Web site program is heavily occupied with system resources, IIS automatically quickly reclaims the process and quickly start the process, your site can temporarily work on.

Restrictions on memory and process recovery time settings: I set to memory consumption of more than 800M automatically recycled memory, virtual memory is not limited. Process recovery time I keep the default unchanged. You can set a shorter time according to your own situation. The maximum virtual memory for the application pool can also be set here, exceeding the maximum set of virtual memory, and the pool will be reclaimed.

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.