You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Jack, Brandy" <bj...@quiktrip.com> on 2009/05/06 22:35:02 UTC

Weekly restart of Tomcat service

We currently have a 3rd party application that isn't stable and we have
to restart Tomcat at least once a week to keep the application running.

We have nagged the 3rd party vendor so much about other application
fixes that asking them to fix this would require some information and
statistics that indicate it is a coding or configuration issue.

Has anyone had any experience in regards to gathering performance stats
for Tomcat or can you help me determine the best way to get the
information I need to give to the vendor?

I would appreciate any advice or help I can get.

 

Signed,

DBA, not the server admin and the only one willing to dive into the
issue to find a solution.

 

 

 

Brandy Jack

I/S Dept

Database Management

ofc: (918) 615-7743

cel: (918) 527-4027

 



------------------------------------------------
The information in this e-mail from QuikTrip Corporation is confidential and may be legally privileged.
It is intended solely for the addressee.  Access to this e-mail by anyone else is unauthorized.  If you
are not the intended recipient, be advised that you have received this e-mail in error and that any use,
dissemination, forwarding, printing or copying is strictly prohibited.  If you receive this e-mail in 
error, please immediately notify the sender via reply e-mail and delete this communication.

QuikTrip Corporation

Re: Weekly restart of Tomcat service

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Brandy,

On 5/6/2009 4:52 PM, Jack, Brandy wrote:
> If we don't restart, the users cannot access the application.
> It is java based (I think) and they blame it on the SQL server (of
> course) which is an entirely different server.

I wonder if your database connections might be timing-out. Can you post
the contents of the "context.xml" file? You might have to look in
several places for this file:

1. In Tomcat's conf/Catalina/localhost/[appname].xml
or
2. In the deployment directory (something like
   TOMCAT_HOME/webapps/[appname]/META-INF/context.xml)
or
3. In the application's WAR file (appname.war/META-INF/catalina.xml)
   (Note that WAR files are just ZIP files with a particular
    directory structure and file layout... just it open with
    WinZip or whatever)

- - OR -

4. In Tomcat's conf/server.xml file in a section called <Context>.

Before you post this file (or the <Context> section(s) from your
server.xml), take care to remove any sensitive information such as
database usernames and passwords. Please retain as much information as
you are willing, because the more info we have, the better.

> Is it the catalina files or the stderr files?

Specifically, you should check the stderr files or catalina.out (usually
only one of these contains both stdout and stderr). It wouldn't hurt to
check /all/ log files.

Try something like:

C:\Tomcat> find "Exception" logs\*.* > exceptions.txt

Feel free to post only a representative sample :)

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkoESU0ACgkQ9CaO5/Lv0PDqgwCgsso+wQ1uvTUtvYeuMSY1QcHm
qDIAoIFvCJgMtFOqFlUGD7E6deZKDoI/
=D3ad
-----END PGP SIGNATURE-----

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


RE: Weekly restart of Tomcat service

Posted by "Jack, Brandy" <bj...@quiktrip.com>.
It looks like the version of Java is 1.5.0_11

Brandy Jack
I/S Dept
Database Management
ofc: (918) 615-7743
cel: (918) 527-4027

-----Original Message-----
From: Caldarale, Charles R [mailto:Chuck.Caldarale@unisys.com] 
Sent: Wednesday, May 06, 2009 4:45 PM
To: Tomcat Users List
Subject: RE: Weekly restart of Tomcat service

> From: Jack, Brandy [mailto:bjack@quiktrip.com]
> Subject: RE: Weekly restart of Tomcat service
> 
> The tomcat version seems to be 5.5.26.
> It is running on Windows Server 2003 SP2.

JVM version?

> Can I get a thread dump from the command line on the server?

Yes, if you're running on a 1.5 or newer JVM, and have a JDK installed.
Use jps to find the process id Tomcat is using, then jstack to take a
thread dump.  Taking a thread dump in a normally running situation will
give you an idea of what things should look like, so you can compare it
to what you get when the server becomes unresponsive.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.


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


------------------------------------------------
The information in this e-mail from QuikTrip Corporation is confidential and may be legally privileged.
It is intended solely for the addressee.  Access to this e-mail by anyone else is unauthorized.  If you
are not the intended recipient, be advised that you have received this e-mail in error and that any use,
dissemination, forwarding, printing or copying is strictly prohibited.  If you receive this e-mail in 
error, please immediately notify the sender via reply e-mail and delete this communication.

QuikTrip Corporation

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


RE: Weekly restart of Tomcat service

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Jack, Brandy [mailto:bjack@quiktrip.com]
> Subject: RE: Weekly restart of Tomcat service
> 
> The tomcat version seems to be 5.5.26.
> It is running on Windows Server 2003 SP2.

JVM version?

> Can I get a thread dump from the command line on the server?

Yes, if you're running on a 1.5 or newer JVM, and have a JDK installed.  Use jps to find the process id Tomcat is using, then jstack to take a thread dump.  Taking a thread dump in a normally running situation will give you an idea of what things should look like, so you can compare it to what you get when the server becomes unresponsive.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.


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


RE: Weekly restart of Tomcat service

Posted by "Jack, Brandy" <bj...@quiktrip.com>.
Sorry, I'm new to this.
The tomcat version seems to be 5.5.26.
It is running on Windows Server 2003 SP2.

Can I get a thread dump from the command line on the server?

Brandy Jack
I/S Dept
Database Management
ofc: (918) 615-7743
cel: (918) 527-4027


-----Original Message-----
From: Caldarale, Charles R [mailto:Chuck.Caldarale@unisys.com] 
Sent: Wednesday, May 06, 2009 4:35 PM
To: Tomcat Users List
Subject: RE: Weekly restart of Tomcat service

> From: Jack, Brandy [mailto:bjack@quiktrip.com]
> Subject: RE: Weekly restart of Tomcat service
> 
> If we don't restart, the users cannot access the application.

If you can reproduce the problem in a test environment, that would help.

Regardless, take a thread dump of Tomcat when the situation occurs; the
mechanism to do so varies by platform and JVM (you didn't bother to tell
us that, or even the version of Tomcat you're using).  On a reasonable
recent JVM, the easiest way to get a thread dump is with the jstack tool
from the JDK.

> But I'm not sure which log files contain the errors I 
> should be looking for.

Any and all of them may contain useful information.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.


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


------------------------------------------------
The information in this e-mail from QuikTrip Corporation is confidential and may be legally privileged.
It is intended solely for the addressee.  Access to this e-mail by anyone else is unauthorized.  If you
are not the intended recipient, be advised that you have received this e-mail in error and that any use,
dissemination, forwarding, printing or copying is strictly prohibited.  If you receive this e-mail in 
error, please immediately notify the sender via reply e-mail and delete this communication.

QuikTrip Corporation

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


RE: Weekly restart of Tomcat service

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Jack, Brandy [mailto:bjack@quiktrip.com]
> Subject: RE: Weekly restart of Tomcat service
> 
> If we don't restart, the users cannot access the application.

If you can reproduce the problem in a test environment, that would help.

Regardless, take a thread dump of Tomcat when the situation occurs; the mechanism to do so varies by platform and JVM (you didn't bother to tell us that, or even the version of Tomcat you're using).  On a reasonable recent JVM, the easiest way to get a thread dump is with the jstack tool from the JDK.

> But I'm not sure which log files contain the errors I 
> should be looking for.

Any and all of them may contain useful information.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.


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


Re: Weekly restart of Tomcat service

Posted by Hassan Schroeder <ha...@gmail.com>.
On Wed, May 6, 2009 at 1:52 PM, Jack, Brandy <bj...@quiktrip.com> wrote:

> If we don't restart, the users cannot access the application.

They get a 404, or _______?

> It is java based (I think) and they blame it on the SQL server (of
> course) which is an entirely different server.

If I were you I'd install Lambda Probe
  <http://www.lambdaprobe.org/d/index.htm>
and use it to follow DB connection pool and memory usage, etc. at least.

An exhausted connection pool can make it seem like the app has
simply stopped...

> I am looking in the tomcat log files from days past.
> But I'm not sure which log files contain the errors I should be looking
> for.
> Is it the catalina files or the stderr files?

Depends on how logging is set up, which is pretty flexible. Do tail -f
on all of the ones with current timestamps and wait for the app to go
to sleep again :-)

FWIW,
-- 
Hassan Schroeder ------------------------ hassan.schroeder@gmail.com

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


RE: Weekly restart of Tomcat service

Posted by "Jack, Brandy" <bj...@quiktrip.com>.
If we don't restart, the users cannot access the application.
It is java based (I think) and they blame it on the SQL server (of
course) which is an entirely different server.
I am looking in the tomcat log files from days past.
But I'm not sure which log files contain the errors I should be looking
for.
Is it the catalina files or the stderr files?


Brandy Jack
I/S Dept
Database Management
ofc: (918) 615-7743
cel: (918) 527-4027


-----Original Message-----
From: Hassan Schroeder [mailto:hassan.schroeder@gmail.com] 
Sent: Wednesday, May 06, 2009 3:49 PM
To: Tomcat Users List
Subject: Re: Weekly restart of Tomcat service

On Wed, May 6, 2009 at 1:35 PM, Jack, Brandy <bj...@quiktrip.com> wrote:
>
> We currently have a 3rd party application that isn't stable and we
have
> to restart Tomcat at least once a week to keep the application
running.
>
> We have nagged the 3rd party vendor so much about other application
> fixes that asking them to fix this would require some information and
> statistics that indicate it is a coding or configuration issue.

What happens if you /don't/ restart? Aren't there log messages that
would be enough to convince them there's a problem?

> Has anyone had any experience in regards to gathering performance
stats
> for Tomcat

Here's one from lambdaprobe running on my production server (on
Tomcat 6.0.x) -- "UP for 328 days 19 hours 34 minutes"

One example of *not* requiring weekly restarts  :-)

FWIW,
-- 
Hassan Schroeder ------------------------ hassan.schroeder@gmail.com

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


------------------------------------------------
The information in this e-mail from QuikTrip Corporation is confidential and may be legally privileged.
It is intended solely for the addressee.  Access to this e-mail by anyone else is unauthorized.  If you
are not the intended recipient, be advised that you have received this e-mail in error and that any use,
dissemination, forwarding, printing or copying is strictly prohibited.  If you receive this e-mail in 
error, please immediately notify the sender via reply e-mail and delete this communication.

QuikTrip Corporation

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


Re: Weekly restart of Tomcat service

Posted by Hassan Schroeder <ha...@gmail.com>.
On Wed, May 6, 2009 at 1:35 PM, Jack, Brandy <bj...@quiktrip.com> wrote:
>
> We currently have a 3rd party application that isn't stable and we have
> to restart Tomcat at least once a week to keep the application running.
>
> We have nagged the 3rd party vendor so much about other application
> fixes that asking them to fix this would require some information and
> statistics that indicate it is a coding or configuration issue.

What happens if you /don't/ restart? Aren't there log messages that
would be enough to convince them there's a problem?

> Has anyone had any experience in regards to gathering performance stats
> for Tomcat

Here's one from lambdaprobe running on my production server (on
Tomcat 6.0.x) -- "UP for 328 days 19 hours 34 minutes"

One example of *not* requiring weekly restarts  :-)

FWIW,
-- 
Hassan Schroeder ------------------------ hassan.schroeder@gmail.com

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