04 January, 2022

Sitecore xDB Index Rebuild - Stuck at Finishing stage with 95% completion

In a Sitecore Managed Cloud instance, I started to rebuild the xDB Index. 

  • I opened Kudu console of xxx--xc-search App Service. 
  • Changed folder to "D:\home\site\wwwroot\App_Data\jobs\continuous\IndexWorker". 
  • Ran .\Sitecore.XConnectSearchIndexer.exe -rr (or .\Sitecore.XConnectSearchIndexer.exe -requestrebuild).
After waiting for a long time, I checked the status of the rebuild and it was stuck at the stage "Finishing" with 95% completed. I restarted the rebuild again and same results after several hours. In my local machine, it has completed without any problem. 

To check the status of the rebuild in Sitecore 10, you can run .\Sitecore.XConnectSearchIndexer.exe -rm (or .\Sitecore.XConnectSearchIndexer.exe -rebuildmonitor).

Downloaded the entire application content (D:\home\site\wwwroot\App_Data\jobs\continuous\IndexWorker) and compared it with local setup. I could see a different setting for Solr Writer - MaximumCommitMilliseconds in "IndexWorker\App_data\Config\Sitecore\SearchIndexer\sc.Xdb.Collection.IndexWriter.SOLR.xml". It was 600000 in Managed cloud setup. I changed it to 1000 and started the rebuild. After several hours, it completed successfully. 

If the Sitecore solution depends on Real Time xDB updates, then we should have default value which is 1000 or near to it. Our solution is not dependent on xDB real time updates but we kept it to default to make sure our rebuild process completes. This KB page explains the reason for updating the setting. 

Rebuild stages:


No index rebuild is requested or running.


The index rebuild is requested but has not started yet.


The index rebuild is in the preparation stage.


The existing xDB collection data is being extracted and re-indexed.


Data added during the previous stage is being indexed.


The post-rebuild steps are being performed.


The index rebuild activities have finished.

No comments:

Post a Comment

blockquote { margin: 0; } blockquote p { padding: 15px; background: #eee; border-radius: 5px; } blockquote p::before { content: '\201C'; } blockquote p::after { content: '\201D'; }