Is auto-restarting services (like tomcat) a good idea?

Posted on

Is auto-restarting services (like tomcat) a good idea? – Managing your servers can streamline the performance of your team by allowing them to complete complex tasks faster. Plus, it can enable them to detect problems early on before they get out of hand and compromise your business. As a result, the risk of experiencing operational setbacks is drastically lower.

But the only way to make the most of your server management is to perform it correctly. And to help you do so, this article will share nine tips on improving your server management and fix some problem about linux, tomcat, java, , .

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?

Solution :

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.

Leave a Reply

Your email address will not be published.