Quantcast
Channel: Configuration & Scripting
Viewing all articles
Browse latest Browse all 780

IIS 8 periodicRestart configuration bug, default setting is 29 days instead of 29 hours

$
0
0

Hello,

While configuring websites in our production environment we ran into the follow issue,

IIS 8, Windows Server 2012 R2.

Bug:

- If we don't alter the default PeriodicRestart > Time interval > Value then the ApplicationHost file doesn't contain Application Pool default attributes and time interval value. As a result of which it transforms the default programmed value of 29 hours per recycle into a period of 29 days.

Scenario:

- IIS 8 was setup to recycle every 1740 minutes by default, in the [Application Pool Defaults] > Regular Time Interval value. So: recycle app-pool every 29 hours, right? We haven't touched this default value because its exactly where we want it at.

- In practice: Certain websites ran for more than 5 days without being recycled. Why? We asked ourselves. What's happening? [Application Pool Defaults] is telling us the default is at 1740 minutes. Yet the individual recycling interval is showing as 41760 minutes / 29 days!

- I verified through the IIS.Net website (here) that the Regular Time interval is supposed to be stored in the ApplicationHost config file. 

Like so,

<applicationPoolDefaults >
   <recycling>
        <periodicRestart time="1.05:00:00" />
   </recycling>
</applicationPoolDefaults>

https://docs.microsoft.com/en-us/iis/configuration/system.applicationHost/applicationPools/add/recycling/periodicRestart/

- It turns out that unless we FIRST explicitly save a non-default Regular Time Interval (e.g. 1741 minutes) via [Set Application Pool Defaults] that the ApplicationHost file WON'T contain the sample I refer to above. So: No recylcing attributes, no periodicRestart attribute. After saving the non-default time interval it adds them:  containing: [time="1.05:01:00"] if I save 1741 minutes, which is correct.

- If we then switch it back to 1740 minutes the ApplicationHost file correctly saves as [time="1.05:00:00"] and stores / retains the recyling attribute. 

- For each server instance we run we now have to input a non-default [Application Pool Defaults] > Regular Time Interval value. And then replace it with 1740 minutes, so that IIS behaves like expected. I'm not saying its a disaster. But its obviously wrong, unhandy, and it invites human error. We have no desire to use app-pool specific time intervals. We are aware that we could do so with Octopus-Deploy and powershell scripting.

Conclusion:

- If If we don't alter the default PeriodicRestart > Time interval > Value then the ApplicationHost file doesn't contain Application Pool default attributes and time interval value.  IIS then (apparantly) tells itself to do: <periodicRestart time="29:00:00" /> which transforms into 29 DAYS when beyond 24 or 23. As a result of which all application pools show an individual recycle time of 41760 minutes /  29 days.

This issue would be resolved if the default value was immediately stored in the ApplicationHost file. Instead of inserted there after the first change to the time interval property. There now appear to be two method paths (saved / not saved in ApplicationHost file). Having only one would be better.

I have searched this forum for earlier reports concerning this bug. I didn't find any mention of it.

Apologies if it has been reported before.

Thank you for reading,

Kind regards,

Bart


Viewing all articles
Browse latest Browse all 780

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>