Lucene.net and Threading

liming

Perch
Hey all,

Anybody has experience with Lucene.Net running on jodo using multi-threading?

Basically I implemented Lucene.Net for my application and I was able to Index and search for everything just fine without dealing with multi-threading.

Now with some modifications (base on others suggestions using multi-threading), I ran the indexing functions by initiate it in a thread like the following

Code:
System.Threading.Thread schedulerThread = null;
Scheduler scheduler = new Scheduler();
System.Threading.ThreadStart myThreadStart =
                  new System.Threading.ThreadStart(scheduler.Start);
                schedulerThread = new System.Threading.Thread(myThreadStart);
                schedulerThread.Start();

"scheduler.start" is my indexing function, but when I ran the above coding on jodo, I always get the exception

Lucene.Net.Store.LockObtainFailedException: Lock obtain timed out: SimpleFSLock

Sometimes, after ran it couple of times, the server basically gives up on me all together.

Any suggestion is greatly appreciate it.

Thanks
 
trying to look this up is looks to be a common issue, I am not sure what causes it just yet.
 
Thanks Stephen.

The code works on my local machine, and it's not a medium trust for sure. It might have something to do the number of threads available in an application domain of a shared host. Looks like I'll have to think of some other way around it.

Thanks anyway.
 
Back
Top