a blog for those who code

Tuesday 24 January 2017

How to solve Lock Optain timed out in Solr

In this post we will be discussing about solving Lock Optain timed out error in Solr. When you try o do a full import you will get an error org.apache.lucene.store.LockObtainFailedException: Lock obtain timed out: NativeFSLock@/filepath Permission Denied.


Because of this even though "Total Requests made to DataSource" and "Total Rows Fetched" will be more than 0 but your "Total Documents Processed" will be 0.


To solve the error you need to change the owner of the filepath to the same user as Solr runs under. This should solve the problem of Lock obtain timed out error. After that also if you are getting this error you need to update the writeLockTimeout in solrconfig.xml to 20 seconds rather than 1 second.


After doing this change do restart the indexing and it will start processing the documents.


Please Like and Share the CodingDefined Blog, if you find it interesting and helpful.

No comments:

Post a Comment