lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jian chen <>
Subject Re: Lock File exceptions
Date Mon, 27 Jun 2005 23:30:02 GMT

Recently I looked at the locking mechanism of Lucene. If I am correct,
I think the process for grabbing the lock file will time out by
default in 10 seconds. When the process timed out, it will print out
the IOException.

The lucene locking mechanism is not within threads in the same JVM. It
uses lock files so that other processes (even perl program) could also
be synchronized in terms of accessing the index.

The implementation of the current Lucene locking mechanism uses
"polling" mechanism, i.e, constantly check if the lock file could be
obtained. It would be better that a wait/notify mechanism could be
used rather than polling.

If you don't care about other JVM or process access, maybe you can use
the Java 1.5 reader/writer lock mechanism for synchronizing between
multiple readers and one writers?



On 6/27/05, Yousef Ourabi <> wrote:
> Hello:
> I get this lock-file exception on both Windows and Linux, my app is
> running inside tomcat 5.5.9, jvm 1.5.03...has anyone seen this before?
> If I delete the LOCK file it works, but obviously I shouldn't do
> that...Just wondering what's up?
> IOException caught here: Lock obtain timed out:
> Lock@/usr/local/java/jakarta-tomcat-5.5.9/temp/lucene-4f978fb745a946b4dbce87bf411caa25-write.lock
> Thanks in advance for any help.
> -Yousef
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message