You can try bumping up the timeouts in your SolrJ program, the SolrServer has a bunch of timeout options.
You can pretty easily tell if the optimize has carried through anyway, your index files should have been reduced substantially. But I'm pretty sure it's completing successfully. Why call it with true/true? Is your SolrJ program also responsible for queries and requires knowing about the state of the index? Best Erick On Fri, Dec 2, 2011 at 3:11 AM, Torsten Krah <tk...@fachschaft.imn.htwk-leipzig.de> wrote: > Hi, > > got a question about index optimizing. > At midnight i am calling optimize(true, true) on my SolrServer instance. > However this does fail with: > > org.apache.solr.client.solrj.SolrServerException: > java.net.SocketTimeoutException: Read timed out > at > org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:480) > ~[solr-solrj-3.5.0.jar:3.5.0 1204988 - simon - 2011-11-22 14:55:27] > at > org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:246) > ~[solr-solrj-3.5.0.jar:3.5.0 1204988 - simon - 2011-11-22 14:55:27] > at > org.apache.solr.client.solrj.impl.StreamingUpdateSolrServer.request(StreamingUpdateSolrServer.java:209) > ~[solr-solrj-3.5.0.jar:3.5.0 1204988 - simon - 2011-11-22 14:55:27] > at > org.apache.solr.client.solrj.request.AbstractUpdateRequest.process(AbstractUpdateRequest.java:105) > ~[solr-solrj-3.5.0.jar:3.5.0 1204988 - simon - 2011-11-22 14:55:27] > at > org.apache.solr.client.solrj.SolrServer.optimize(SolrServer.java:205) > ~[solr-solrj-3.5.0.jar:3.5.0 1204988 - simon - 2011-11-22 14:55:27] > at > org.apache.solr.client.solrj.SolrServer.optimize(SolrServer.java:191) > ~[solr-solrj-3.5.0.jar:3.5.0 1204988 - simon - 2011-11-22 14:55:27] > > > The question is - may it take that long so that this request won't ever > be able to be answered and more important - is the optimize still done > "correctly" on the server side and can i ignore those Readtimeout > Exception? > > Whats the right way here to do the optimize? > > regards > > Torsten > > PS: I am using solr 3.5.0.