What is w3wp.exe and how to fix High CPU usage?

If you are using w3wp.exe (IIS) and notice that it’s using a high CPU or memory then there are methods that can be used to restart the IIS. I have explained what is w3wp.exe. uses and how it work with IIS.

The internet is built on web servers and protocols to ensure general users find search results securely and instantaneously. Servers direct traffic to the web applications through ports in two ways. It can streamline all the incoming requests into a single thread or generate a request-based thread each time. Here we will break down how to host static websites and .NET web applications on local Windows desktops and servers.

What is IIS?

Internet Information Services, or IIS, is built on the thread-per-request framework. It hosts web applications and handles client requests received via HTTP, HTTPS, FTP, etc. The platform is primarily targeted for Microsoft Windows Servers being used as web servers. A single application pool in the IIS manager is capable to host multiple web instances on a local PC or Laptop. The design offers both GUI and CLI interactions to configure the system.

How W3wp work?

Worker processes, like w3wp.exe, enable the IIS to run web applications. Suppose a user is building a website using asp.net technology. The asp.net pages won’t open until the IIS has been installed and activated on a local PC. As the application starts as an IIS worker process, the same pool becomes a w3wp.exe process. In other words, the IIS handles each request by grabbing a thread from the thread pool.

Any platform running IIS requires w3wp.exe to manage the IIS web server’s web requests while accessing the defined application pool. Users can find advanced features to configure their application pool, such as –

  • Selecting the Windows account to run the application
  • Auto-restarting process
  • Automatic thread shutdown or hibernation

Where w3wp.exe is located?

A genuine w3wp.exe file will be located under C:\Windows\WinSxS\ directory and the file size of w3wp would be about 10 KB.

Quick Overview

Filename:w3wp.exe
File description:IIS Worker Process
File version:7.5.7601.17514
File Size:19.5 KB
Product name:Internet Information Service
File type:Application
Copyright:Microsoft Corporation
Language:English

The file is a software component accompanying the Internet Information Services package. It is a windows system file published by Microsoft Corporation. If you find w3wp.exe inside any other location or sub-folder apart from the mentioned directory, please note that it is not a worker process and could be malicious.

How to check w3wp is consuming a high CPU?

You can determine the working status of the IIS worker process, including w3wp.exe, from Windows Task Manager. Here are the steps:

  1. Press the Ctrl+Shift+Esc button to launch Task Manager
  2. Go to the Details tab
  3. Now check whether w3wp.exe is consuming high CPU or Memory.

For more information, here are the steps on how can track all running threads from the IIS manager –

  1. Open the IIS Manager and navigate to your device name on the left pane.
  2. Select the “Worker Processes” option from the window. You will see a list of processes currently running on your system.

Using the IIS manager, users can determine the process ID, CPU consumption, and size of the active worker processes. Double-clicking on a specific process also provides information on the application pool, including the following details –

  • Complete URL of the application
  • Duration of executing the web request
  • Client (or user) who initiated the request
  • The current stage of execution in the IIS pipeline
  • ASP .NET module being used

Troubleshooting for High CPU Usage

If the worker process i.e. w3wp.exe is slowing down your system by hoarding space or consuming high Memory then start by analyzing the process details –

  • Check the URL of the requests, and ensure all requests are not under the same one.
  • Ensure a particular client is not jamming the network with high web traffic by sending many requests at once.
  • Sometimes inefficient code may result in a request being stuck on the same module or stage in the ASP .NET pipeline.

Suppose the details do not indicate a particular anomaly, test and debug your web application for errors and implement proper garbage collection practices. Optimize the .NET source code and check the application dependencies.

What to do if w3wp.exe is not running?

Many users have recently complaint that the w3wp.exe process is not running.  In that case, the first instinct should be to check your IIS status, and ensure the IIS Admin and WWW service is active. Then, double-check whether you are running a web application from a defined application pool.

In case the problem is not with your website, restart IIS and follow the steps –

  1. Right-click on the instance of your web application.
  2. Select “Manage Website” and click on Browse
  3. Find the w3wp.exe process and activate it.
  4. Refresh the processes list

The IIS can also be restart using the command line, here are the steps:

1) Click on the Windows logo

2) Type command prompt > right-click and choose Run as administrator

Windows10 run as Administrator

3) Type the below command and hit the Enter button

iisreset /noforce

4) Now wait for few minutes so that the IIS can be first terminate and then restart, a successful message will appeared over the command prompt.

Disabling an IIS worker process

There are two ways you can disable the w3wp.exe worker process –

  1. Deactivate the IIS application pool from the IIS management console
  2. Disable the entire IIS by stopping the “World Wide Web Publish Service” from ‘Services.msc’ as it is a Windows Service.

Users can disable launch on start-up by changing the Start-up type to “Disable” after stopping it.

nv-author-image

Ankita

Founder and Writer @ WinOSBite. Future plan is to make this platform open to community to resolve and discuss various issues, usage related to Operating System.

Leave a Reply

Your email address will not be published. Required fields are marked *