I often use app_offline.htm to show a message to users when I’m making changes to the site. My workflow is as such:
- Rename OFF_app_offline.htm -> app_offline.htm
- Make changes to website
- Rename app_offline.htm -> OFF_app_offline.htm
Sometimes when I do step 3, the website comes back online, but the server is suddenly using 100% of the CPU and thus runs incredibly slowly and iisreset.exe needs to be run to get it running normally again. The two processes that use around 50% CPU each are w3wp.exe and sqlservr.exe. Usually the server sits at around 20% CPU usage.
I don’t have the rights on my VPS account to run iisreset.exe so I have to contact my hosting providers and get them to do it. This is time consuming and meanwhile, my website users get frustrated with slow speeds!
Why is this happening? What can I do to stop it happening? Are there any settings on the server I can suggest that would stop this from happening?
Once you remove the app_offline.htm file, the next request into the application will cause ASP.NET to load the application and app-domain again, and life will continue along as normal.
It should heat the cpu during a perioud but not for a long time.
Try increasing the worker processes for this aplication pool for this application on IIS so not only one w3wp.exe process
assumes all the load.
EDIT:
Try changing your session configuration. I don’t know what storage option are you using for
your session states, (I guess sql-state due to the sql server process load) but maybe you could try to change it:
Check the following link:
Session-State Modes