Client Pay Portal
 kentico

Kentico CMS in Windows Azure – Smart Search Lock Error

If you have a Kentico CMS application deployed to Windows Azure and it uses SmartSearch you may have encountered this error:

Lock obtain timed out: CMS.SiteProvider.SearchLock

This error is causes by a lock on the SmartSearch index for the site. Kentico is constantly manipulating these files as content is updated on the site to ensure the search results are accurate. Occasionally, the application tries to access file in use by something else and the error is generated.

In the Developer’s Guide is a great area for web.config values. In that section are a number of keys that can be used to manipulate and override certain functionality within the site. The following 2 settings can resolve the SmartSearch Lock issue:
 
     <add key= "CMSSmartSearchLockPollInterval " value= "500 " /> 
     <add key= "CMSSmartSearchLockTimeout " value= "1000 " /> 

CMSSmartSearchLockPollInterval
"Specifies how often (time in milliseconds) the smart search indexer tries to acquire a lock on an index file.
The default value of this key is 500 milliseconds.
You should lower the value if the following exception
gets logged into you Event log.

Lock obtain timed out: CMS.SiteProvider.SearchLock“

CMSSmartSearchLockTimeout
"Defines the timeout period (in milliseconds) during which the smart search indexer should try to acquire a lock on the index file.

The default value of this key is 1000 milliseconds.

You should increase the value if the following exception gets logged into you Event log.

Lock obtain timed out: CMS.SiteProvider.SearchLock”

Tip

You can find more information on web.config settings in the Developer's Guide here.
After changing these values to a lower number in the web.config, the error should be removed. Hope this helps!

Author

Wiz E. Wig, Mascot & Director of Magic
Wiz E. Wig

Director of Magic