In the recent weeks the SOLR server system of our customers have the same error regularly, increasingly often. By now it's almost daily. In the client, the SOLR 3.6 throws this exception to the PHP Client:

java.lang.RuntimeException: Lock obtain timed out: NativeFSLock@/var/solr/data/spellchecker/write.lock
    at org.apache.solr.handler.component.SpellCheckComponent.prepare(
    at org.apache.solr.handler.component.SearchHandler.handleRequestBody(
    at org.apache.solr.handler.RequestHandlerBase.handleRequest(
    at org.apache.solr.core.SolrCore.execute(
    at org.apache.solr.servlet.SolrDispatchFilter.execute(
    at org.apache.solr.servlet.SolrDispatchFilter.doFilter(
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(
    at org.apache.catalina.core.StandardWrapperValve.invoke(
    at org.apache.catalina.core.StandardContextValve.invoke(
    at org.apache.catalina.core.StandardHostValve.invoke(
    at org.apache.catalina.valves.ErrorReportValve.invoke(
    at org.apache.catalina.core.StandardEngineValve.invoke(
    at org.apache.catalina.connector.CoyoteAdapter.service(
    at org.apache.coyote.http11.Http11Processor.process(
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(
Caused by: Lock obtain timed out: NativeFSLock@/var/solr/data/spellchecker/write.lock
    at org.apache.lucene.index.IndexWriter.<init>(
    ... 18 more

This can only resolved restarting the Servlet-Container (Tomcat 6). However, talking to the SOLR over curl gives no trouble at all. Only the PHP-Client throws this error continuously. And as far as we know, we don't even touch any spellchecker module of SOLR at all. And the crashes seem to happen at times when there's no indexing happening.

I have tried to solve this by increasing the amount of RAM and the WriteLockTimeout to 20 seconds, but the problem persists.

Can anyone help with a hint on what is the problem?

up vote 1 down vote accepted

It turns out it was a problem with the memory. As the tomcat was installed, someone left the max heap size of the JVM 128M, which caused the JVM to just stop allocating any memory. Instead of proper OutOfMemoryExceptions, we got these cryptic messages.

If you don't touch the spellchecker module at all, can you uncomment that section from your config and restart the service?

I think you're getting multiple "&" requests (so it's trying to rebuild while it's already building, hence the lock) - if you log all your solr requests somewhere check for that and see if you can stop them?

Your Answer


By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.