lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ian Lea <ian....@gmail.com>
Subject Re: Lock obtain timed out
Date Thu, 02 Apr 2009 11:01:21 GMT
Hi


>From the 2.4 javadocs for IndexWriter:

setDefaultWriteLockTimeout(long writeLockTimeout)

    Sets the default (for any instance of IndexWriter) maximum time to
wait for a write lock (in milliseconds).

Lucene waits for the max specified time, retrying every 1000 millisecs
by default, then gives up.  See the docs for Lock for details.

Your options include setting a higher timeout, trapping the timeout
exception in your code and retrying, maybe after a pause, or
queuing/stacking up the updates, as you suggest.  Several ways to do
that, from a queue or stack within the tomcat instance, if you've just
got the one, or a more wide ranging multi process solution like JMS.


--
Ian.


On Thu, Apr 2, 2009 at 11:02 AM, Rehan Abdulaziz
<abdulazizrehan@gmail.com> wrote:
> Hey,
> Lucene is deployed at my Tomcat server, and when I send parallel calls from
> my client to add, delete or update documents, some operations are
> unsuccessful. The following exception is thrown:
>
> org.apache.lucene.store.LockObtainFailedException: Lock obtain timed out:
> SimpleFSLock@D:\testIndex\write.lock
>
> I understand what this means, and why this exception shows up. What I'm
> interested in knowing is what I can do about it. Does lucene try to send the
> query for some time, and then gives up? Is there a way to increase this
> time? Currently, if I send 100 documents to be added from my client, around
> 60-80 of them are added and the rest aren't. If I can play with the time,
> then perhaps I can achieve better performance.
>
> Secondly, can I somehow stack up all the queries at the server so as to
> ensure 100% success rate, no matter how fast the queries arrive? That would
> be helpful.
>
> Thanks,
> Rehan.
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message