You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Sagar Khetkade <sa...@hotmail.com> on 2009/01/19 07:42:40 UTC

Using Threading while Indexing.

Hi,
 
I was trying to index three sets of document having 2000 articles using three threads of embedded solr server. But while indexing, giving me exception “org.apache.lucene.store.LockObtainFailedException: Lock obtain timed out: SingleInstanceLock: write.lock”.  I know that this issue do persists with Lucene; is it the same with Solr? 
 
Thanks and Regards,
Sagar Khetkade.
_________________________________________________________________
For the freshest Indian Jobs Visit MSN Jobs
http://www.in.msn.com/jobs

Re: Using Threading while Indexing.

Posted by oleg_gnatovskiy <ol...@citysearch.com>.
I can verify that multithreaded loading using HTTP does work. That's probably
the way to go.



zayhen wrote:
> 
> Your 3 instances are trying to acquire the physical lock to the index.
> If you want to use multi-threaded indexing, I would suggest http
> interface,
> as Solr will control the request queue for you and index as much docs  as
> it
> can receive from your open threads (resource wise obviously).
> 
> 2009/1/19 Sagar Khetkade <sa...@hotmail.com>
> 
>>
>> Hi,
>>
>> I was trying to index three sets of document having 2000 articles using
>> three threads of embedded solr server. But while indexing, giving me
>> exception "org.apache.lucene.store.LockObtainFailedException: Lock obtain
>> timed out: SingleInstanceLock: write.lock".  I know that this issue do
>> persists with Lucene; is it the same with Solr?
>>
>> Thanks and Regards,
>> Sagar Khetkade.
>> _________________________________________________________________
>> For the freshest Indian Jobs Visit MSN Jobs
>> http://www.in.msn.com/jobs
>>
> 
> 
> 
> -- 
> Alexander Ramos Jardim
> 
> 
> -----
> RPG da Ilha 
> 

-- 
View this message in context: http://www.nabble.com/Using-Threading-while-Indexing.-tp21537667p21574047.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Using Threading while Indexing.

Posted by Alexander Ramos Jardim <al...@gmail.com>.
Your 3 instances are trying to acquire the physical lock to the index.
If you want to use multi-threaded indexing, I would suggest http interface,
as Solr will control the request queue for you and index as much docs  as it
can receive from your open threads (resource wise obviously).

2009/1/19 Sagar Khetkade <sa...@hotmail.com>

>
> Hi,
>
> I was trying to index three sets of document having 2000 articles using
> three threads of embedded solr server. But while indexing, giving me
> exception "org.apache.lucene.store.LockObtainFailedException: Lock obtain
> timed out: SingleInstanceLock: write.lock".  I know that this issue do
> persists with Lucene; is it the same with Solr?
>
> Thanks and Regards,
> Sagar Khetkade.
> _________________________________________________________________
> For the freshest Indian Jobs Visit MSN Jobs
> http://www.in.msn.com/jobs
>



-- 
Alexander Ramos Jardim

Re: Using Threading while Indexing.

Posted by Chris Hostetter <ho...@fucit.org>.
: I was trying to index three sets of document having 2000 articles using 
: three threads of embedded solr server. But while indexing, giving me 
: exception ?org.apache.lucene.store.LockObtainFailedException: Lock 

something doesn't sound right here ... i'm not expert on embeding solr, i 
think perhaps you aren't embedding solr the recommended way .. if you were 
then there would be only one SolrCore for your index, and only one 
IndexWriter -- all of your threads would then interate with this one 
(fully thread safe) SolrCore.

It sounds like you are constructing seperate objects (i forget which one 
it is you construct when embedding) in each thread and winding up with 
multiple SorlCores all competing for write access to the same index.


-Hoss