Irritating CONFIG change shutdown reason - mitikov/KeepSitecoreSimple GitHub Wiki
Agenda
Server restarts randomly saying Shutdown message: CONFIG change while you are confident files were not changed:

Technical aspects
ASP.NET monitors configuration files to restart application whenever anything changes.
It uses set of file changes monitors under the hood.
The code leaving CONFIG change is subscribed to ASP.NET file modification event - ASP.NET quite confident change indeed took place.
Logging file system write operations
We'll use Process Monitor to subscribe to the Windows file-system events, and will log only writes taking place in configuration files under the website folder:
- Start
Process Monitorunder admin - Stop capturing if enabled (either from UI or
CTRL+Ehotkey) Filtermenu -> selectDrop Filtered Eventsnot to consume clog RAM with useless eventsFile->Backing Files-> use named file (will accumulate all write occurrences)- Leave only
File System Activityselected in icons on top Tools->Filter-> Add new rules:
Category is not Write then Exclude
Path excludes C:\inetpub\wwwroot\sc82u7\Website then Exclude
Path ends with config Include
Start capturing (CTRL+E) to start the hunt.
Demo
- Launch Sitecore instance
- Start the collection
- Change configuration file
If an event is logged - all good, can be moved to faulting environment.
Double-click on the event to see the stack trace causing the change.
Further steps
Once your application restarted for no good reason, you can locate the offensive process from backing file picked in the fourth step.
Chances are it could be OS itself bringing you down, or global configuration changes...
Troubleshooting with the Windows Sysinternals Tools book is much recommended to be read as shows great techniques to investigate unexpected behaviors.