You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Yousef Ourabi <yo...@gmail.com> on 2005/06/28 00:58:30 UTC

Lock File exceptions

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: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: Lock File exceptions

Posted by jian chen <ch...@gmail.com>.
Hi,

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?

Cheers,

Jian

On 6/27/05, Yousef Ourabi <yo...@gmail.com> 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: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
> 
>

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


Re: Lock File exceptions

Posted by Yousef Ourabi <yo...@gmail.com>.
Mini-Follow UP:
Wouldn't the parameter boolean create false create the segments if it
is not found? My understanding is that the create variable either
creates or doesn't the actual directory on startup...does this affect
key files as well?

IOException caught here: /var/jeteye/index/segments (No such file or directory)




On 6/27/05, Yousef Ourabi <yo...@gmail.com> 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: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org