Score:0

How can we find out what setting IIS thinks has changed to necessitate an app pool recycle?

by flag

When we start a docker container we see this in the system logs. IIS starts and then immediately thinks some settings have changed. As a result, we see 3 simultaneous runs of Application_Start in our web application, with 3 different processes. The original, plus two additional processes, each triggered by one of these two events.

02/10/2022 14:13:43 WAS Information The worker processes serving application pool 'DefaultAppPool' are being recycled due to 1 or more configuration changes in the application pool properties which necessitate a restart of the processes.   

02/10/2022 14:13:43 WAS Information The worker processes serving application pool 'DefaultAppPool' are being recycled due to 1 or more configuration changes in the application pool properties which necessitate a restart of the processes.   

02/10/2022 14:13:43 Service Control Manager Information The W3SVC service entered the running state.

Adding insult to injury, we often see that 2 of the 3 processes crash (typically with an OOM exception) while one succeeds. On other starts of the docker container, all 3 processes startup fine and two are terminated by IIS normally. I'm more concerned with why 3 are starting at once, literally within the same millisecond according to higher-resolution app startup logs in ASP.NET's global.asax Application_Start logic.

We cannot figure out what's triggering these triple startup events. Is there some way to figure out what specific setting or file it thinks has changed, or what changed it?

We have IIS configured to use a single worker process. This related question about multiple worker processes starting suggest it could be a VM-specific issue because of the sudden time change? Does IIS Sometimes Allocate More Worker Processes Than Configured? Or perhaps it is a virus scanner? How to find out why IIS application pool is recycling due to application pool property changes We just cannot figure out what, specifically is being triggered or by what.

Lex Li avatar
vn flag
As Microsoft's IIS Docker images start from the ServiceMonitor executable https://github.com/microsoft/IIS.ServiceMonitor, you might check what it does and whether the recycles were triggered by it.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.