I'm going to go ahead and replay to myself since I solved my problem.
It seems I was doing one more update to the data at the end and wasn't
doing a commit, so it then couldn't write to the other core. Adding the
last commit seems to have fixed everything.
On 2/1/2011 11:08 AM, Alex Thurlow wrote:
I recently added a second core to my solr setup, and I'm now running
into this "Lock obtain timed out" error when I try to update one core
after I've updated another core.
In my update process, I add/update 1000 documents at a time and commit
in between. Then at the end, I commit and optimize. The update of
the new core has about 150k documents. If I try to update the old
core any time after updating the new core (even a couple hours later),
I get the below error. I've tried switching to the simple lock, but
that didn't change anything. I've tried this on solr 1.4 and 1.4.1
both with the spatial-solr-2.0-RC2 plugin loaded.
If I restart solr, I can then update the old core again.
Does anyone have any insight for me here?
Feb 1, 2011 10:59:57 AM org.apache.solr.common.SolrException log
SEVERE: org.apache.lucene.store.LockObtainFailedException: Lock obtain
timed out:
NativeFSLock@./solr/data/index/lucene-088f283afa122cf05ce7eadb1b5ce07b-write.lock
at org.apache.lucene.store.Lock.obtain(Lock.java:85)
at
org.apache.lucene.index.IndexWriter.init(IndexWriter.java:1545)
at
org.apache.lucene.index.IndexWriter.<init>(IndexWriter.java:1402)
at
org.apache.solr.update.SolrIndexWriter.<init>(SolrIndexWriter.java:190)
at
org.apache.solr.update.UpdateHandler.createMainIndexWriter(UpdateHandler.java:98)
at
org.apache.solr.update.DirectUpdateHandler2.openWriter(DirectUpdateHandler2.java:173)
at
org.apache.solr.update.DirectUpdateHandler2.addDoc(DirectUpdateHandler2.java:220)
at
org.apache.solr.update.processor.RunUpdateProcessor.processAdd(RunUpdateProcessorFactory.java:61)
at
org.apache.solr.handler.XMLLoader.processUpdate(XMLLoader.java:139)
at org.apache.solr.handler.XMLLoader.load(XMLLoader.java:69)
at
org.apache.solr.handler.ContentStreamHandlerBase.handleRequestBody(ContentStreamHandlerBase.java:54)
at
org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:131)
at org.apache.solr.core.SolrCore.execute(SolrCore.java:1316)
at
org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:338)
at
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:241)
at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1089)
at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:365)
at
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
at
org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
at
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:211)
at
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
at org.mortbay.jetty.Server.handle(Server.java:285)
at
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:502)
at
org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:835)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:641)
at
org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:202)
at
org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:378)
at
org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:226)
at
org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)