Old Device Detection databases are not deleted automatically

  • The Device Detection database files in the /App_Data/DeviceDetection folder are never deleted when the updates happen. Sitecore XP downloads an updated database periodically. When the new database is downloaded, the old ones are supposed to be deleted. Currently, obsolete databases remain stored in the file system, which causes unnecessary disk space usage.

  • As a workaround for the issue:

    • Delete obsolete databases (either manually, or using PowerShell script, and so on).
    OR
    • Configure Sitecore.Tasks.CleanupAgent agent in Sitecore.config file to check the /App_Data/DeviceDetection folder and remove old files automatically by adding the text, highlighted with bold, as follows:
      <agent type="Sitecore.Tasks.CleanupAgent">
        <files>
          <remove folder="$(dataFolder)/diagnostics/configuration_history" pattern="*" maxAge="30.00:00:00" recursive="false" />
          <remove folder="$(dataFolder)/diagnostics/health_monitor" pattern="*.*" maxAge="07.00:00:00" recursive="false" />
        <remove folder="$(dataFolder)/DeviceDetection" pattern="*.*" maxAge="07.00:00:00" recursive="false" />
        </files>
      </agent>
      
      Note: Choose the appropriate value of maxAge that is suitable for your solution.

    In case Device Detection is not used:

    Remove databases and disable Device Detection in order to prevent Sitecore XP from downloading the database again:

    • In the Sitecore.CES.DeviceDetection.config file, set the value of the DeviceDetection.Enabled setting to false:

      <setting name="DeviceDetection.Enabled" value="false" />

Applies to:

CMS 9.0 Initial Release - 9.2 Initial Release

CMS 9.3 Initial Release

September 03, 2019
November 28, 2019

Reference number:

328306