I order to improve performance of a Sitecore solution that is hosted in Azure webApp its recommended to remove the Sitecore FileWatchers.
Sitecore FileWatchers are “watching” various folders in the disk for changes (delete, create, rename) and this process is consuming in Azure webApps and prone to instance restarts.
All FileWatchers in Sitecore are defined in the Web.config under /configuration/system.webServer/modules:
As all Sitecore FileWatchers are in fact HTTP Modules.
Beside that section in Web.config, all FileWatchers are also reading various settings from Sitecore configuration.
So, in order to have better stability of your Sitecore instance is needed to disable all the Sitecore FileWatchers as follows:
- remove the definition of the FileWatchers from web.config file for your needed environment with config transformation at the build/release/deploy time
- remove the definition of watchers from Sitecore.config file using a patch config file. Here is an example:
Happy Sitecoring!