• Published
  • 1 min

How to prevent EPiServer sites flooding the EventLog with inactivity errors

<p>A client's EPiServer site polluted the Windows EventLog with lots of inactivity errors from the site's application pool. Changing the "Idle timeout" property in IIS solved this problem.</p>

While many warnings/errors in the EventLog are non-critical, they can cause false alarms in server monitoring software and should be fixed if possible.

The server EventLog was full of the following error:

Faulting application name: w3wp.exe, version: 7.5.7601.17514, time stamp: 0x4ce7a5f8
Faulting module name: clr.dll, version: 4.0.30319.261, time stamp: 0x4ec9f6ff
Exception code: 0xc0000409
Fault offset: 0x002b64bc
Faulting process id: 0x12e8
Faulting application start time: 0x01cd2435a505cfae
Faulting application path: C:\Windows\SysWOW64\inetsrv\w3wp.exe
Faulting module path: C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll

Debugging: Programming error or server config?

My initial thought was that this was caused by programming error, and googling the problem indicated the same.

However, after carefully examining the EPiServer logs with lots of logging enabled, I found no errors or warnings at the corresponding time with the EventLog errors.

When examinig the Web Server (IIS) Log, I found several info and warning messages of the following type:

A worker process with process id of '4840' serving application pool 'MySite.InterAppPool' was shutdown due to inactivity.  Application Pool timeout configuration was set to 20 minutes.  A new worker process will be started when needed.

The timestamp on the warning messages matched the EventLog errors.

My comment is: "Really?"! No need to throw this exception. I checked some other sites, and these errors appeared on them as well.

Solution: Change the IIS timeout property

Go to IIS and open the Advanced Properties for your site's Application Pool. 
Increase the "Idle Timeout" property from default 20 minutes to something like 1440 (24 hours). 
(More info for IIS 6 and for IIS 7.)

I see no reason why the Application Pool should ever shutdown due to inactivity.