tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marco Pöhler <li...@poehlerpoehler.de>
Subject RE: tomcat daily restart
Date Wed, 02 Jun 2004 09:46:12 GMT
The tomcat version is 5.0.19 and the pid option works well, my script looks
now like:

----%<-----
#!/bin/bash
kill -9 `cat /usr/local/java/tomcat/tomcat.pid`
/etc/init.d/tomcat start
---->%-----

thanks !

> -----Ursprüngliche Nachricht-----
> Von: Shapira, Yoav [mailto:Yoav.Shapira@mpi.com]
> Gesendet: Dienstag, 1. Juni 2004 22:04
> An: Tomcat Users List
> Betreff: RE: tomcat daily restart
>
>
>
> Hi,
> Well, you're killing all java processes.  That seems a bit
> excessive, especially running as root since you WILL kill other
> people's jobs.
>
> You didn't specify your tomcat version.  Assuming it's from
> within the last year, there is a catalina-pid option you can set
> in $CATALINA_HOME/bin/catalina.sh.  If set, the process ID (PID)
> of the tomcat server will be written to the file specified in
> that attribute.  Your script would then look for this file and
> kill the PID specified in the file.  You could run this script as
> the tomcat server user, you don't need to be root, and your
> overall setup would be more secure and more robust.
>
> Yoav Shapira
> Millennium Research Informatics
>
>
> >-----Original Message-----
> >From: Marco Pöhler [mailto:lists@poehlerpoehler.de]
> >Sent: Tuesday, June 01, 2004 4:01 PM
> >To: tomcat-user
> >Subject: tomcat daily restart
> >
> >Hi,
> >
> >somewhere in my web application is a memory leak, and the tomcat hangs
> >after
> >a week and /etc/init.d/tomcat stop won't work also. The
> application will be
> >rewritten, so it is not important to find the leak. I'm
> currently think it
> >is okay to restart the tomcat every night. I wrote the simple
> shell script
> >below to do the job. The script is started as cronjob by root. The Script
> >works, but my question is: Are there better solutions ? Are there any
> >pitfalls I havn't seen ?
> >
> >----%<-----
> >#!/bin/bash
> >kill -9 `ps ax | grep java | awk '{ print $1 }'`
> >/etc/init.d/tomcat start
> >---->%-----
> >
> >thanks in advance
> >
> >Marco
> >
> >---
> >http://www.tintenpatronen-preisvergleich.de
> >http://www.contact-lenses-price-comparison.com
> >
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> >For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
>
>
> This e-mail, including any attachments, is a confidential
> business communication, and may contain information that is
> confidential, proprietary and/or privileged.  This e-mail is
> intended only for the individual(s) to whom it is addressed, and
> may not be saved, copied, printed, disclosed or used by anyone
> else.  If you are not the(an) intended recipient, please
> immediately delete this e-mail from your computer system and
> notify the sender.  Thank you.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message