puppet-elasticsearch icon indicating copy to clipboard operation
puppet-elasticsearch copied to clipboard

Timeout of 10s is too short during the startup process..

Open diranged opened this issue 7 years ago • 3 comments

https://github.com/elastic/puppet-elasticsearch/blob/cb2726a8e8d01b955df96c9c82faff3c5e0ac967/files/etc/init.d/elasticsearch.Debian.erb#L156

Using ElasticSearch 6.2.3 on Ubuntu 14.04, the timeout is too short for some reason.. it takes ~11s for the app to start up in our environment, so the init script errors out even though ES starts up properly.

diranged avatar Apr 21 '18 22:04 diranged

So that timeout value is drawn from the upstream init script which uses the same timeout value and logic. If it's causing problems during startup, my thought is that it should be changed upstream (with possibly an environment variable the init script consumes for a timeout value?) so that the fix can be standardized (and validated by the Elasticsearch team as well), then we can sync with any fixes they may have with the init script. Thoughts?

tylerjl avatar Apr 23 '18 16:04 tylerjl

I ran into this too on CentOS 7. I changed it to 1 minute.

alex-harvey-z3q avatar Jun 28 '18 09:06 alex-harvey-z3q

The timeout for the init script is just "kicking off" elasticsearch, but from the time the init script comes back (which is actually really fast), to the time when elasticsearch is actually "ready" is significantly longer. The default value should be at least 30, if not 60. Thankfully its a parameter, so you just have to add the following to heiradata:

elasticsearch::api_timeout: 30

or add it as a parameter to the elasticsearch class in your puppet code if you prefer not to use hieradata ;)

~tommy

TJM avatar Mar 20 '19 21:03 TJM