A large number of users recently raised this issue on the Internet. Typical problem: in the past few days, the server has been running slowly. After remote failover, A w3wp.exe process has occupied 100% of the CPU.
For every web application in Windows Server 2003, IIS uses an independent w3wp.exe instance to run it. W3wp.exe is also called a working process (each host header has one)
It does not take effect to end the process directly in the task manager. It will be started shortly after the end. to end the process, you can find the corresponding application in IIS.ProgramThe application pool stops working.
These are not solutions. The fundamental problem is that your website program has problems, before finding the problem, open IIS and find the application pool. First, right-click the property and set "performance" to set the CPU to greater than 60% to close the application pool, set the close time and start time to a shorter time, for example, 10 seconds. In this way, when your website programs occupy a large amount of system resources, IIS automatically recycles the process and starts the process quickly, your website will be ready for work now.
To solve the root problem, you must check the program. You can right-click the application pool in IIS to create multiple application pools, then, at the bottom of the file home option in each host header, map the application pool to the application pool that was just created, close the task manager one by one to see which program occupies a large amount of resources.
Below are some posts related to netizens that may be helpful to you.
My friend's web server has been running normally, but the CPU usage has been nearly 100% in the past few days, so let's check it out.
The server uses Windows 2003 and the website uses the ASP + ACCESS database. Later, w3wp.exe occupies more than 70% of the CPU,
When viewing web logs, the site traffic is low, and there are not many TCP connections. Net stop W3SVC is used to stop the web service, and the CPU usage is normal immediately. Net start w3svc started the web and then again. Stop all virtual sites and create a new virtual site. No problem is found. It is suspected that it is the site's ownCodeProblem.
Check the homepage Code in the following structure:
This section of code creates w3wp.exe that occupies a large amount of CPU. Is it an endless loop? There seems to be no reason. Add the count in the loop body and find that it is an endless loop. This indicates that Rs. EOF is always false. Add the following code:
If Rs. EOF = true then response. Write "EOF is true"
If Rs. EOF = false then response. Write "EOF is false"
If the output is EOF is true EOF is false, it indicates that the value of Rs. EOF cannot be determined. Why is it so puzzling. Check the database and find that there is no mytable table in the database. If the table does not exist, Rs. open "select * From mytable", conn will have an error, why is there no error, it is very likely that the caught exception is ignored.
Check the conn. asp file and find the exception handling code:
On Error resume next
The original problem is this.
On Error resume next ignores Table query failures and subsequent errors, resulting in an endless loop.
Why can't I find the mytable table while the website is running normally? After carefully checking the website, I found that "there are customers coming from afar". I uploaded a backdoor tool and deleted multiple data tables, which made me busy for a day.
More content you can also go to: http://www.microsoft.com/china/technet/security/guidance/secmod93.mspx
Find more detailed security settings
Windows iis6.0 Solution
In the past few days, the server has been running slowly. After remote failover, it is found that a w3wp.exe process occupies 100% of the CPU.
There are two reasons for the problem:
1. The use of JET database connection problems: http://support.microsoft.com /? Id = 838306
Patch download:
CHS: WindowsServer2003-KB838306-x86-chs.exe
Enu: WindowsServer2003-KB838306-x86-enu.exe
2. Change the ACCESS database extension to ASP.
The following is my error process and solution:
There are quite a few similar problems found in the search. The w3wp process is the application pool of iis6.0. There are two online statements: one is that ASP or Asp.net Code contains an endless loop. But who knows that there are problems with so many websites on the server. Second, due to the bug in the above jet connection to the database, downloading the 838306 patch or upgrading to SP1 can solve this problem, but after the patch is installed, some websites still have problems.
Search again. It is said that you can set up an independent application pool for each website, and set the Security Account of the application pool to a local service. The method is as follows:
First, create an application pool:
Then point the application pool of the website to the application pool just created:
After all application pools are created, the attributes of the application pool are modified in a unified manner:
Specify the application pool security account as a local service:
After these settings, the problem still exists. Such a website may not affect other websites, but it still occupies a large amount of resources, resulting in slow response from other websites. However, the process in each application pool appears in the task manager, so you can find the specific problematic process.
The following is the process of searching for a website with errors: To locate the Website, you must associate the problematic process with the application pool of the website. First, set the view mode of the task manager and add the PID display:
Then run iisapp-A on the command line to see the correspondence between the PID and the application pool:
Go to IIS and check the website corresponding to the application pool. If there is a problem with the website, you will find it. The rest is the problem in the website code.
After a website administrator had been entangled, I finally couldn't bear it. I helped him find a mistake-I had configured IIS countless times, and the website program had changed. The upgrade was also upgraded, the problem still exists. You can download the website to your local computer to see what is going on. When I tried to open his database, the problem occurred:
His database is a. asp extension. It can be opened only after it is changed to. MDB. But when I click it to change the name, my computer does not respond ~! It seems that the problem lies in this database.
After you use the command line rename, you can open the database and fix it. It seems that there is no problem, but when you change it to. asp, the problem just occurred again. Ha ~ It turns out that the extension of. asp is strange.
But I tried to change other databases to. asp. The root cause is unknown. please let us know.
Finally, if an ISAPI is added to IIS to correspond to mdb, MDB cannot be executed. This prevents downloading and changes all. asp databases back to. MDB. The problem is solved.