High Memory Usage While Rebuilding Indexes

In this article

Symptoms

When attempting to rebuild the Coveo indexes, the Sitecore instance uses all the available memory. The IIS process then restarts and the rebuild can’t complete.

Cause

When enabled, the Caching.DisableCacheSizeLimits setting unlocks the memory limit that the Sitecore caches can use.

Resolution

Set the value of the Caching.DisableCacheSizeLimits setting to false.

You can use the https://<INSTANCE_HOSTNAME>/sitecore/admin/cache.aspx page to monitor the amount of memory used by each of the Sitecore caches. A good place to start is to tune the database caches:

  1. Open the <SITECORE_INSTANCE_ROOT>\App_Config\Sitecore.config file in a text editor.

  2. Find the database configuration.

    <database id="master" singleInstance="true" type="Sitecore.Data.DefaultDatabase, Sitecore.Kernel" role:require="ContentManagement">
      <param desc="name">$(id)</param>
       ...
  3. Inside the database configuration, you will find a <cacheSizes> element. You can then adjust the cache size to suit your needs.

     <cacheSizes hint="setting">
       <data>100MB</data>
       <items>50MB</items>
       <paths>2500KB</paths>
       <itempaths>50MB</itempaths>
       <standardValues>2500KB</standardValues>
     </cacheSizes>
  4. Test run your site and look at the cache.aspx page to see which caches are underused and which are overused. Tweak values as necessary.