Bigtoe
Bigtoe

Reputation: 3530

Does having the IIS log header in the log file mean that IIS was reset during the day?

When I'm viewing IIS log files I can see various times during the day where the header line is written out to the log file. The only time I've seen this is happening is when IIS resets; or starts up. For example the header line below;

#Software: Microsoft Internet Information Services 6.0
#Version: 1.0
#Date: 2010-10-18 07:28:06
#Fields: date time s-sitename s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) sc-status sc-substatus sc-win32-status 

The customer is saying there is no IIS resets happening; but does this entry in the log file mean that IIS was definitely reset for some reason which may be outside of the customers control.

Upvotes: 5

Views: 3945

Answers (2)

piter entity
piter entity

Reputation: 527

According to Dean Cron (Microsoft engineer working in IIS team) the logging headers are re-written on:

  1. IIS reset
  2. Server reboot
  3. App Pool recycling
  4. If you've added or removed one or more logging fields in the logging configuration.
  5. If a site doesn't receive requests for a set period of time (15 minutes), the handle to the associated log file is closed. The next time a request comes in, the log file is re-opened and the log headers written.

You can find more details in Dean's blog post.

So no, the header appearing in the log file does not mean that IIS was reset.

Upvotes: 0

Bigtoe
Bigtoe

Reputation: 3530

Eventually figured in out in the wee hours of the morning. If you have W3C logging enabled for different web sites/services, but have different fields configured for those web sites/services then when site1 is hit it output the list of fields and later on when site2 is hit it appends any different fields onto the list of the 1st fields and outputs the combined set of fields.

So having multiple sets of the # directives in the log file does not necessarily means that IIS was reset.

Upvotes: 3

Related Questions