Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

jonmolnar's avatar

How to Keep Elasticsearch Running

I have elasticsearch installed via this Forge recipe

http://forgerecipes.com/recipes/29

I can start it up just fine, index everything I need to index, and search the index.

But periodically elasticsearch crashes for reasons that I can't seem to figure out and I have to ssh in and restart it. Also when I deploy new code to the site it often crashes.

Am I doing something wrong? Should I be using supervisor to keep it running? It seems unnecessary because it runs without issue in my dev environment. But in production it seems unstable.

0 likes
3 replies
bashy's avatar

I would sort out the crashing first because that shouldn't be happening.

As for the auto restarting of it, you will need to run something like supervisor to do tasks to check if it's running.

jonmolnar's avatar

Crashed again today for no rhyme or reason. How should I go about trouble shooting this? This is the first time I've used ES.

smayzak's avatar

The first thing you should do is install something to monitor Elasticsearch so you have some eyes on the internals. Marvel is the official monitoring plugin and its free for use during development, comes with a trial and can be downloaded freely from the website here: http://www.elasticsearch.org/overview/marvel/

Once you have it running, you can start to see what metrics look good and which ones don't. Marvel automatically changes the color of problem metrics so its a great place to start. Once you have some data it should just be a matter of finding the trouble spots and fixing them with a config change etc.

Please or to participate in this conversation.