Performance Sitecore

Performance: disable Sitecore watchers in Azure webApp

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:

Web.Config FileWatchers.

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.

Sitecore Config File Watchers

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
<?xml version="1.0"?>
<!– For more information on using Web.config transformation visit –>
<configuration xmlns:xdt="" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1">
<add type="Sitecore.Resources.Media.UploadWatcher, Sitecore.Kernel" xdt:Locator="Match(type)" xdt:Transform="Remove" />
<add type="Sitecore.IO.XslWatcher, Sitecore.Kernel" xdt:Locator="Match(type)" xdt:Transform="Remove" />
<add type="Sitecore.IO.LayoutWatcher, Sitecore.Kernel" xdt:Locator="Match(type)" xdt:Transform="Remove" />
<add type="Sitecore.Configuration.ConfigWatcher, Sitecore.Kernel" xdt:Locator="Match(type)" xdt:Transform="Remove" />
  • remove the definition of watchers from Sitecore.config file using a patch config file. Here is an example:
<?xml version="1.0" encoding="utf-8" ?>
<configuration xmlns:patch="" xmlns:environment="">
<watchers environment:require="!DEV">
<patch:delete />

Happy Sitecoring!


By Sebastian Tecsi

Sitecore MVP 2018-2021
Sitecore Architect

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.