Troubleshooting local search indexes on Azure

This page describes solutions to issues related to locally stored smart search indexes when running Xperience applications on Azure.

Deleting .lock files

Quick fix

If the search functionality is not working properly, you can try deleting files with the .lock extension on the blob storage. Connect to your blob storage (for example through Cloudberry for Azure) and manually delete them.


A blob storage is shared between all instances of Xperience. If your Azure environment operates in multiple instances, it is important to prevent collisions. Therefore, to prevent multiple instances from manipulating the same index at the same time and ensure exclusive write operations, Xperience useslocking. Every time the smart search needs to manipulate a search index, it creates a special file with the .lock extension. This file indicates that a search indexer is working with the index. When the work is done, the system deletes the file from the storage.

There are two different lock files in the blob storage:

  • searchtaskindexer.lock – located in the~/App_Data/CMSModules/SmartSearch directory.
  • write.lock – located in the directory of specific search indexes.

In some cases, these lock files may not get deleted. This may happen when the process working with the search index ends unexpectedly. When this happens, processing of indexing tasks for locally stored indexes becomes stuck. The solution is to manually delete the lock files.

This problem may occur again if you store the search indexes on an external storage. For example, a scaled-out instance can unexpectedly terminate while working with an index file. To prevent this issue, you can Configure the scheduler to process search tasks.

Configuring the scheduler to process search tasks

Add the following key to the appSettings section of your Xperience administration project’s web.config file:

<add key="CMSProcessSearchTasksByScheduler" value="true" />

Make sure that the Execute local search tasks scheduled task is enabled and set to a reasonable value (for example one hour).