System.IO.IOException: Lock obtain timed out - Problem indexing with lucene.net?
Hi,
I'm using the asp.net framework lucene.net to index text to be able to search it easily.
This has been working fine, but suddenly I got problems with having write permissions to the directories that lucene uses (index and temp).
I tried to delete the former indexing files, but I'm stuck at this error message:
System.IO.IOException: Lock obtain timed out: Lock@D:\xxxxxxxxxxx\Temp\lucene-9ad3e71bc5841b99fcf8c97ba8b78a57-write.lock at Lucene.Net.Store.Lock.Obtain(Int64 lockWaitTimeout) at Lucene.Net.Index.IndexWriter..ctor(Directory d, Analyzer a, Boolean create, Boolean closeDir) at Lucene.Net.Index.IndexWriter..ctor(String path, Analyzer a, Boolean create)
I didn't change anything related to it, and I checked the write permissions, which are ok. I also still have the lockdir defined in the web.config file:
Anyone knows what could be the issue here?
Status:
Open Sep 19, 2006 - 08:06 AM
lucene.net, text indexing
5answers
Answers
Sep 19, 2006 - 02:22 PM
Anpanman,
It doesn't look like anything should've disrupted Lucene in what you've explained. The only thing I can think of is that the parent privileges could've been changed. The recent MS updates for XP screwed up one of my apps that writes to TEMP as well. I just had to reset the privs on the parent, and everything went back to working.
Might not be a 200 point answer, but it couldn't hurt to check it out just in case XP got you, too.
Ric
Sep 19, 2006 - 02:45 PM
Thanks, Ric.
I was also thinking it was a problems of writing privileges, but the thing is that it doesn't happen to me on my development computer, only on the shared hosting provider. I've written them, but didn't get an answer yet.
Oct 10, 2006 - 08:11 AM
It boils down to the ASP.NET account not having writing privileges. My hosting provider changed something and for a couple of weeks I can't upload files via web, can't use lucene, well can't do something that's very basic in a website!
I'm testing out another provider these days and hopefully will be changing very soon.
Oct 10, 2006 - 08:12 AM
you get the points anyway, ric :)
It was an urgent matter...
Jan 19, 2007 - 04:45 AM
Apparently it might also be the account called NETWORK SERVICE in .net 2.0 or whatever the application pool identity is running as, that needs modify/write permissions to the index and temp folders.
Answer this question
Share Your Own Experience & Expertise
We look to ensure that every question is answered by the best people with relevant expertise and experience, the best answers include multiple perspectives. Do you have relevant expertise or experience to contribute your answer to any of these commonly asked questions?
Add New Comment