Monday, September 5, 2016

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

Figure-2: Checking the recycle settings
2) Since, we do not have the automatic App Pool recycle, we manually recycle it.

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.
Figure-4: Memory is released

 

1 comment:


  1. Nice Blog Techsaga, as Software development company experts, deliver inspiring, eye-catching designs and measurable campaigns that connect with target audiences, boost online marketing and encourage business growth. We can help you meet your needs across a range of full service online marketing services. Are you looking for help with great content, SEO, PPC campaigns, a full digital marketing strategy, campaign, or something else? No matter what you need, our experts can help you.

    ReplyDelete

Note: Only a member of this blog may post a comment.