I have Rails 5 application that uses solr to index and search our site. The
sunspot gem is used to integrate ruby and sunspot.  It's a relatively small
site (no more 100,000 records) and has moderate usage (except for the
googlebot).

Until recently we regularly received 503 errors; reloading the page
generally cleared it up, but that was not exactly the user experience we
wanted so we added the following initializer to force the retry on failures:

Sunspot.session =
Sunspot::SessionProxy::Retry5xxSessionProxy.new(Sunspot.session)

As a result, about every third day the site locks up until we rebuild the
data directory (stop solr, move data directory to another location, start
solr, reindex).

At the point it starts failing I see a java exception: "java.io-IOException:
Too many open files" in the solr log file and a SolrException (Error open
new searcher) is returned to the user.

In the solrconfig.xml file we have autoCommit and autoSoftCommit set as
follows:

  <autoCommit>
     <maxTime>${solr.autoCommit.maxTime:15000}</maxTime>
     <openSearcher>false</openSearcher>
  </autoCommit>

  <autoSoftCommit>
     <maxTime>${solr.autoSoftCommit.maxTime:-1}</maxTime>
  </autoSoftCommit>

Which I believe means there should be a hard commit every 15 seconds.

But it appears to be calling commit more frequently. In the solr log I see
the following commit written miliseconds from each other:

  UpdateHandler start
commit{,optimize=false,openSearcher=true,waitSearcher=true,expungeDeletes=false,softCommit=false,prepareCommit=false}

I also see the following written right below it:

PERFORMANCE WARNING: Overlapping onDeckSearchers=2

Note: maxWarmingSearchers is set to 2.


I would really appreciate any help I can get to resolve this issue.

Thank you! 



--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html

Reply via email to