I can answer you some of your questions.

 

  1. According to the error, the cause of this is likely there’s another Solr server which also use this directory. Another potential cause is your Solr server has been crashed (it can be JVM crash or VM crash) before that, so the lock is not cleared.
  2. First stop Solr server on the VM (if they’re running). Locate the lock files (file which name is `write.lock`) and delete them. In your case the lock file should be located at `C:\home\site\wwwroot\server\solr\fsoft_marketingdefinitions_web\data\index\write.lock`. After delete the lock files, you should be able to start the server again.

 

On 2024/03/13 10:52:48 Thinh Nguyen Hai wrote:

> Hi Solr support teams,

>

> As I mentioned before, I would like to ask for your support.

> It affects our production environment, when we install Solr 8.8.2 on Azure App service. We also logged a ticket for Sitecore support, but could not fix this issue.

> Please help me check.

>

> Thanks & Best Regards,

> Nguyen Hai Thinh

> -----------------------------------------------------------------------------------------

> FHN.GEC -  FPT Software Company Limited

> Address:   FPT Building, 17 Duy Tan Street, Dich Vong Hau Ward, Cau Giay District, Hanoi, Vietnam

> Mobile  :   +84 346 58 78 70

>

> From: Thinh Nguyen Hai

> Sent: Friday, March 8, 2024 6:05 PM

> Cc: Thien Ngo Thanh <th...@fpt.com>; Hoang Vu Van <ho...@fpt.com>

> Subject: LockObtainFailedException in solr - Solr with Azure App Service

>

> Hi Solr support,

> I have an Azure App service which is setup Solr services in here.

> Recently we often encounter this error in my PRODUCT environment, It greatly affects our customers.

> Log message:

> LockObtainFailedException: Index dir 'C:\home\site\wwwroot\server\solr\fsoft_marketingdefinitions_web\data\index/' of core 'sitecore_marketingdefinitions_web' is already locked. The most likely cause is another Solr server (or another solr core in this server) also configured to use this directory; other possible causes may be specific to lockType: native

> And see it in the attached file.

> It occurs on all Solr cores, when it's occurred, I must attempt to restart the Solr server.

> Look into the attached file to see the error image and the Solr configuration.

> I've done about a solution for the issue with Solr cores getting locked when using an Azure App Service before, but we still had intermittent issues even with this solution provided by Sitecore support:

> - The Azure Web App is not scaled out (instance count should be set to 1).

> - The environment variable WEBSITE_DISABLE_OVERLAPPED_RECYCLING is set to 1.

> I have 4 questions:

> 1, Why does this happen?

> 2, How do I fix it?

> 3, Does Solr provide a patch/solution that can completely fix the infra side (Solr with Azure App Service)? Or must it be handled from the project?

> 4, What should the project side do? Can I create a virtual machine in Azure and setup Solr there? or, alternatively, look at a SearchStax solution offering a fully managed Solr-as-a-Service!

>

>

> Thanks & Best Regards,

> Nguyen Hai Thinh

> -----------------------------------------------------------------------------------------

> FHN.GEC -  FPT Software Company Limited

> Address:   FPT Building, 17 Duy Tan Street, Dich Vong Hau Ward, Cau Giay District, Hanoi, Vietnam

> Mobile  :   +84 346 58 78 70

>

>

> ***********************************************************************

> IMPORTANT NOTICE

> From May 1st, 2023, FPT Software will officially use only one email domain named @fpt.com. Exchanges sent to @fsoft.com.vn will be automatically transferred to this new domain.

> This email may contain confidential and/ or privileged information that belongs to FPT Software. If you are not the intended recipient or might have received this email by accident from an unreliable source, please notify the sender from FPT Software immediately and destroy this email. Keep in mind that any unauthorized copying, editing, disclosure or distribution of the material in this email is strictly forbidden, plus against the law by which FPT Software and involved clients abide.

>

--------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@solr.apache.org For additional commands, e-mail: dev-h...@solr.apache.org

Reply via email to