# Disconnect between when Elasticsearch is "running" and when it's "available"

**URL:** <https://discuss.elastic.co/t/disconnect-between-when-elasticsearch-is-running-and-when-its-available/207392>\
**Category:** Elasticsearch\
**Created:** [November 11, 2019, 4:40pm UTC](https://discuss.elastic.co/t/disconnect-between-when-elasticsearch-is-running-and-when-its-available/207392 "2019-11-11T16:40:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tubbo](https://avatars.discourse-cdn.com/v4/letter/t/ecccb3/32.png) [@tubbo](https://discuss.elastic.co/u/tubbo)\
**Post date:** [November 11, 2019, 4:40pm UTC](https://discuss.elastic.co/t/disconnect-between-when-elasticsearch-is-running-and-when-its-available/207392/1 "2019-11-11T16:40:56Z")

</div>

Is there any way to make it so Elasticsearch won't say it's running until it can actually accept requests? I've constantly had to build in hacks in my projects that essentially are there just because Elasticsearch takes forever to start up and begin accepting requests. I know the JVM takes a while to load, but there's gotta be a better solution than either `sleep`-ing for a random length of time or just feverishly polling `:9200` to figure out whether ES is alive or not...

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [December 9, 2019, 4:40pm UTC](https://discuss.elastic.co/t/disconnect-between-when-elasticsearch-is-running-and-when-its-available/207392/2 "2019-12-09T16:40:57Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
