Sitecore XP stability issues when using Azure Web Apps


Description

Sitecore solutions that have been deployed to Azure Web Apps may experience some stability issues due to changes made to the Azure Web Apps File Change Notification mechanism. The article describes the errors that might appear and possible solutions to the problem.

For any additional questions, open a ticket on the Sitecore Support Portal.

Errors

The following errors might appear in the log files:

ERROR Error in FileWatcher. Internal buffer overflow. Exception: System.IO.InternalBufferOverflowException
Message: Too many changes at once in directory:D:\home\site\wwwroot\
WARN Shutdown message: Directory rename change notification for 'D:\home\site\wwwroot'.
Overwhelming Change Notification in wwwroot HostingEnvironment initiated shutdown

The server might respond with the 503 Service Unavailable error to incoming requests. Additionally, you might experience repeated Sitecore application restarts.

Solution 1 – Use Azure Portal

Disable the Dynamic Cache by creating an App Setting for the impacted App Service:

Solution 2 – Disable Sitecore Diagnostics

Rename the \wwwroot\App_Config\Include\Sitecore.Diagnostics.config file to Sitecore.Diagnostics.config.disabled.

This configuration file enables collection of diagnostics information that can be useful to troubleshoot Sitecore behavior. It can be safely disabled if there are no ongoing troubleshooting processes that requires enabled diagnostics.

Solution 3 – Reconfigure Sitecore XSL Watcher

Modify the \wwwroot\App_Config\Sitecore.config file as shown below:

<sitecore>
...
<watchers>
...
<xsl>
<folder>/xsl</folder>
...
</xsl>
...
</watchers>
...
</sitecore>

Note: Starting from Sitecore XP 8.2.5 this solution is implemented out of the box.