Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Are there any reasons to not auto-restart tomcat in the case of a crash? It seems like a no-brainer to restart the process, especially in production, if that can mean less downtime due to a crash, but typically this isn't the default in the /etc/init.d/tomcat6 provided by most distributions. It makes sense that during development, if the server crashes, you want to be aware of it and then be able to troubleshoot the system in its current state. Is it a "best practice" to auto-restart services like Tomcat in production environments?

share|improve this question
It's best practice to not crash in the first place. – Michael Hampton May 8 '13 at 21:13
I agree, but we all know that the JVM crashes sometimes. – dgrant May 8 '13 at 21:33
If you set it to auto-restart, then I would set that restart to also include some kind of alert message or log. You want to find and fix the problems, and that might be more difficult if you are not aware that they exist. – Zoredache May 8 '13 at 22:07
up vote 2 down vote accepted

In my experience as a SysEng, I'd advise against auto restarting services in production, especially if you have a history of issues. Using daemontools pains me. I've seen too many servers get into a crash loop and fill up their drives with logs before someone can get to them, which just creates even more headache. I would recommend against it, but everyone weighs risks differently in their environments.

That said, some configuration systems like Puppet can also enforce services to be running, and there can be more logic to ensure dependencies, and prevent issues.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.