I have a Tomcat 7 instance in Dogado Jelastic cloud (Jelastic platform version is 2.5.2). As well I have a Bamboo, which deploys everynight two applications on this Tomcat 7 instance. Due to some problems in applications I have memory leaks, which break the apps after some time. So I want to restart the server periodically to fix this problem (I know it's not good fix, but that's enough for now). I found a few ways to restart the Tomcat 7 automatically:
- Using Jelastic REST API - it requires to do two requests: authentication and action).
- Using cron tasks (which are provided by jelastic admin panel) - it seems that Jelastic doesn't see a newly started Tomcat's instance.
So I have two questions:
- Are there any ways to simplify these two methods (for example, one-call API request, or correct way to restart Tomcat using cron task)?
- Are there any other ways to restart Tomcat automatically?
Thanks!