Developer forum

Forum » PIM » Index build failed

Index build failed

Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi guys,

We are experiencing a recurring issue with Index builds.

It happened rather often, although we cannot reproduce it manually.

Sometimes we get this error:

10:29:01.141: Product index builder experienced a fatal error.. System.Exception: Lock file already present: D:\dynamicweb.net\Solutions\dynamicweb\altexpim.cloud.dynamicweb-cms.com\files\System\Indexes\PIM\PIM\D\write.lock created: (05/10/2025 08:28:26) ---> Lucene.Net.Store.LockObtainFailedException: Lock obtain timed out: NativeFSLock@D:\dynamicweb.net\Solutions\dynamicweb\altexpim.cloud.dynamicweb-cms.com\files\System\Indexes\PIM\PIM\D\write.lock    at Lucene.Net.Store.Lock.Obtain(Int64 lockWaitTimeout)    at Lucene.Net.Index.IndexWriter.Init(Directory d, Analyzer a, Boolean create, IndexDeletionPolicy deletionPolicy, Int32 maxFieldLength, IndexingChain indexingChain, IndexCommit commit)    at Lucene.Net.Index.IndexWriter..ctor(Directory d, Analyzer a, Boolean create, MaxFieldLength mfl)    at Dynamicweb.Indexing.Lucene.LuceneIndexWriter.Open(Boolean openForAppend)    --- End of inner exception stack trace ---    at Dynamicweb.Indexing.Lucene.LuceneIndexWriter.Open(Boolean openForAppend)    at Dynamicweb.Ecommerce.Indexing.ProductIndexBuilder.Build(IIndexWriter writer, Tracker tracker)
 

Sometimes we get this error:

Product index builder experienced a fatal error.. System.Exception: Lock file is NOT present: D:\dynamicweb.net\Solutions\dynamicweb\altexpim.cloud.dynamicweb-cms.com\files\System\Indexes\PIM\PIM\D\write.lock. Time in ms taken in Open: 2008, writer timeout ms: (2000) ---> Lucene.Net.Store.LockObtainFailedException: Lock obtain timed out: NativeFSLock@D:\dynamicweb.net\Solutions\dynamicweb\altexpim.cloud.dynamicweb-cms.com\files\System\Indexes\PIM\PIM\D\write.lock    at Lucene.Net.Store.Lock.Obtain(Int64 lockWaitTimeout)    at Lucene.Net.Index.IndexWriter.Init(Directory d, Analyzer a, Boolean create, IndexDeletionPolicy deletionPolicy, Int32 maxFieldLength, IndexingChain indexingChain, IndexCommit commit)    at Lucene.Net.Index.IndexWriter..ctor(Directory d, Analyzer a, Boolean create, MaxFieldLength mfl)    at Dynamicweb.Indexing.Lucene.LuceneIndexWriter.Open(Boolean openForAppend)    --- End of inner exception stack trace ---    at Dynamicweb.Indexing.Lucene.LuceneIndexWriter.Open(Boolean openForAppend)    at Dynamicweb.Ecommerce.Indexing.ProductIndexBuilder.Build(IIndexWriter writer, Tracker tracker)

 

I have tried all kinds of solutions. Adding the write.lock file, removing it, deleting Index files, and trying to run it again but no solution worked. The only solution is to delete the build completely and add a new one with a different name and location.
it is true that we are running on an old Dw solution (9.13.12) but we don't have the option to upgrade as the solution is highly customized.

I am wondering if anybody faced a similar issue and figured out a solution for it.

Thank you,
Adrian


Replies

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

Hi Adrian

We did make some updates on lockfile management in later releases.

The only option I can see is to ensure the user running the IIS process have enough priveleges to make the required changes to the folder....

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Nicolai,

Thank you for the response.
Can I use a newer DLL for indexing in my solution without upgrading the entire solution?
In my case, the setup is in DW Cloud. I assume the user's permissions should be high enough to allow changes to the folder, right? Anything in particular I should look for?

Thank you,
Adrian

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

Maybe you can.

You can check the dependencies of the packages on Nuget:

https://www.nuget.org/packages/Dynamicweb.Indexing.Lucene

Simply try it out in staging and see if it works and if it will help on the issue.

 

You must be logged in to post in the forum