IIS Worker Process (w3wp.exe) memory usage too high in Exchange Server

w3wp.exe process is an IIS web application process to handle the client request for the application pool. Exchange server services heavily utilized w3wp process not only to handle users request from external but themselves make web service requests among Exchange server members using virtual directories (Owa, OAB & Powershell etc) and respective App pools. Unless you have not configured periodic recycling for Application Pool, you may need to do manual recycle to avoid memory leaks. Microsoft Technet states that:Internet Information Services (IIS) application pools can be periodically recycled to avoid unstable states that can lead to application crashes, hangs, or memory leaks. By default, application pool recycling is overlapped, which means that the worker process that is to be shut down is kept running until after a new worker process is started. After a new worker process starts, new requests are passed to it. The old worker process shuts down after it finishes processing its existing requests, or after a configured time-out, whichever comes first. This way of recycling ensures uninterrupted service to clients. However, if an application in the application pool cannot run more than one instance of itself at a time, overlapping rotation can be disabled [source:Technet]

As shown in Fig-1, you can see the MsExchangePowershellFrontEndAppPool is consuming much memory which visually hits in the task manager. This  may be due memory leaks or we may need further analysis on App Pool. Anyway, we need to recycle that pool without restarting the IIS.

IIS Application Pool of Exchange Server

Figure-1: IIS Application Pool memory usage too high

1) First check whether the automatic recycle is enabled. From IIS management console, select the application pool and on the right pane, under the Edit Application Pool, click the Recycling…. See Figure-2. You can also do automatic application pool recycle settings with your desired criteria. (Every 2 hrs, 12:00PM daily or when specific virtual/private memory hits to specific threshold).

IIS Application Pool Recycle Setting

Figure-2: Checking the recycle settings

2) Since, we do not have the automatic App Pool recycle, we manually recycle it.

Manually Recycling the App Pool

Figure-3: Manually Recycling the App Pool

Now, the w3wp process and respective App Pool are back to normal. See Figure-4.
Note: This is also applicable to web servers which uses managed web service & .net applications.

Memory is released

Figure-4: Memory is released

This entry was posted in Exchange Server, IIS. Bookmark the permalink.

Leave a Reply

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