tuk
tuk

Reputation: 6862

Increasing Solr5 time out from 30 seconds while starting solr

Many time while starting solr I see the below message and then the solr is not reachable.

debraj@boutique3:~/solr5$ sudo bin/solr start -p 8789
Waiting to see Solr listening on port 8789 [-]  Still not seeing Solr listening on 8789 after 30 seconds!

I am having two cores in my local set-up. I am guessing this is happening because one of the core is a little big. So solr is timing out while loading the core. If I take one of the core out of solr then everything works fine.

Can some one let me know how can I increase this timeout value from default 30 seconds?

I am using Solr 5.2.1 on Debian 7.

Upvotes: 3

Views: 2256

Answers (1)

LendarMyst
LendarMyst

Reputation: 106


Usually this could be related to startup problems, but if you are running solr on a slow machine, 30 seconds may not be enough for it to start.
In that case you may try this (I'm using Solr 5.5.0)

Windows (tested, working): in bin/solr.cmd file, look for the parameter

-maxWaitSecs 30

few lines below "REM now wait to see Solr come online ..." and replace 30 with a number that meets your needs (e.g. 300 seconds = 5 minutes)

Others (not tested): in bin/solr file, search the following code

if [ $loops -lt 6 ]; then
  sleep 5
  loops=$[$loops+1]
else
  echo -e "Still not seeing Solr listening on $SOLR_PORT after 30 seconds!"
  tail -30 "$SOLR_LOGS_DIR/solr.log"
  exit # subshell!
fi

Increase waiting loop cycles from 6 to whatever meets your needs (e.g. 60 cycles * 5 sleep seconds = 300 seconds = 5 minutes). You should change the number of seconds in the message below too, just to be congruent.

Upvotes: 4

Related Questions