IIS Worker Process Recycling

Document ID : KB000049616
Last Modified Date : 14/02/2018
Show Technical Document Details

Description:

The web hangs or shows W3SVC error in the windows event log. This can potentially also cause the server to hang and not allow RDP until a reboot.

Usually when something like this happens, it's because the server memory was filled up by the IIS process being full, and that causes the web to not work and could contribute to the server having other issues as well. It can also contribute to mysql corruption if the NetQoS services have issues completing queries, loading files, etc.

The IIS Service (W3SVC) as shown in the event logs is not a service (as it would seem by being called 'W3SVC'), but is actually the IIS worker process that uses an executable (w3wp.exe) that ASP .NET then uses to run applications on the server from web client calls.

The problem is in the .NET and IIS services: on a busy server if the worker process lasts too long it can crash or run out of memory. The default recycle time for IIS WP is set pretty long (1740 minutes or 29 hours). W3wp.exe will open a session for each browser session, and will remain open until the timeout. Setting that to recycle more often can help with this issue.

Caution: worker process recycling might cause issues with the EM datasource.

Solution:

So here is what you should do first:

  1. Right-click My Computer -> Manage.

  2. Expand Services and Applications -> Internet Information Services.

  3. Right-click Application Pools -> Properties.

  4. Change the first option 'Recycle worker processes (in minutes)' to 120.

  5. Check the boxes next to Maximum virtual memory and Maximum used memory and raise the values to 800 and 500.

  6. You might need to also do this for NPC/RA/NV/SA and the Default App Pool.

  7. Hit OK and close Computer Management, then open a cmd prompt and run 'iisreset'.

    See if the issues persist after making these changes.