Tuesday, May 24, 2011

Solr Java Service Wrapper restarts after commit

We noticed our Solr instance was restarting every few days after optimizing. We use the Java Service Wrapper from Tanuki Software to run our instance as a service. The wrapper has a property for Ping Timeout. Basically, the wrapper pings the JVM to see if it is still alive every 30 seconds (default). If it does not get a response from the JVM, the wrapper restarts itself.

Solr optimization is a resource intensive process. I've noticed it used 100% of the CPU for over a minute. This caused the JVM to restart. To go around this issue, I increased the wrapper ping timeout to 120 seconds. This is a quick fix but will not work when the index gets large enough to the point that it takes more than a couple of minutes to optimize. But in that case you are better off looking at some other strategies to speed optimization altogether.  


  1. Do you happen to have your script + config for Tanuki around somehwere ?

  2. Hi Kris, unfortunately I changed jobs recently and don't have access to the config. In hindsight, I wished I backed it up somewhere for my own reference. Lesson learned.

    Hope you were able to get around your problem.