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.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
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.
Please or to participate in this conversation.