We've been noticing lately that Sitecore CM app suddenly becomes slowly, and when this happens, checking the logs in the backend, Sitecore keeps restarting itself for several times, and then becomes stable again. This also happens after a deployment, when the appPool is recycled, and then Sitecore needs about 10 restarts to become stable again.
The message in the logs is usually the same:
WARN Sitecore shutting down
WARN Shutdown message: Directory rename change notification for 'C:\inetpub\wwwroot\zzzz'.
Overwhelming Change Notification in zzzz
HostingEnvironment initiated shutdown
After contacting with Sitecore support, it happens that there is a known issue in Windows 2012 R2 that recycles IIS when a lot of changes are detected inside the "/App_Data" folder. This is documented from Sitecore here: https://kb.sitecore.net/articles/669309. Sitecore 9 is extending support to Azure Web Apps, so now the old "Data" folder is not outside the site, but it's using now the asp.net standard "App_Data" folder, which is inside the root folder of the site, and Sitecore processes a lot of I/O work during startup, which was causing IIS to recycle the appPool every time.
To fix the issue:
- Download the patch from MS at https://support.microsoft.com/en-us/help/3052480/unexpected-asp-net-application-shutdown-after-many-app-data-file-chang
- Install the patch
What should be an easy process, became more complicated, because the patch did not install correctly, and we got this error:
To fix this, Microsoft Support provided the following steps:
1. Expand the patch to a temp folder, using the command:
expand -f:* "C:\path\to\Windows8.1-KB3052480-v2-x64.msu" C:\path\to\tempfolder
2. Install it manually
dism /online /add-package /packagepath:"C:\path\to\tempfolder\\Windows8.1-KB3052480-v2-x64.cab"
3. Finally, check at Windows Update Installed updates that it is installed correctly, searching for "KB3052480"
This has become a mandatory patch for any Sitecore project running under a Windows 2012 R2 environment.