On Jan 26, 2013, at 5:19 AM, Sunil Shevante wrote: > Hi, > > Is it possible to restart tomcat from within itself? > > I host a JSP website and somehow the memory utilization keeps on increasing > from time to time. I then have to manually restart Tomcat. > > While I understand that in the long term, I should focus on fixing the memory > leaks, is there a way by which I can restart Tomcat after the free memory > goes below a threshold percentage?
I wouldn't try to do this inside Tomcat. With the tools provided by the JVM (jmap or JMX), you can monitor just as easily from outside Tomcat. Instead, create a monitoring script to watch the Tomcat process. When memory usage hits a certain level, dump the heap (so you can analyze your memory problem later) and restart Tomcat. Alternatively, you could use a preexisting tool to monitor your Tomcat instance like Nagios or Hyperic. > > I am using tomcat 6.0.14 on unix. This is really old, upgrade. Dan > > Thanks, > Sunil --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org