Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
3  
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
1  
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
add comment

1 Answer

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
add comment

Your Answer

 
discard

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.