Re: New Tomcat shuts down thread

2007-01-12 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Steve,

Steve Ingraham wrote:
> As I stated previously I manually stop and start Tomcat every morning.
> It is not that big of an inconvenience to do that in general but at the
> same time I would like to know why it is doing this and resolve it.
> There is something wrong with the application and fixing it would make
> things run smoother.

You mentioned that your users get an error when whatever happens to
Tomcat happens. Can you describe that error? I think you said something
like "not enough components". Does that appear on a stack trace, or as
an error message to the user?

I'm wondering if you are running out of database connections. (Although,
unless you require a database connection to shut down the server, it
wouldn't explain the fact that you have to kill -9 the server).

The infinite loop suggestion has a better chance of explaining /that/.
Can you wait for the server to get all messed up and take more careful
notes? That's probably the best next step to take. Check out CPU usage
(just run 'top' and see how much CPU time the java process is taking).
If the CPU isn't being eaten by java, then it's probably not a "code out
of control" problem.

Check all your log files: catalina.out, localhost_*.log,
[appname]_*.log, and any application-specific logs you may have (such as
log4j.log). These can usually be found in the TOMCAT_HOME/logs directory.

Certainly post a stack trace if you get one in any of those log files.
Another thing you can to is trigger a thread dump. From that, it's
(sometimes) possible to see that all the request handler threads are
stuck waiting on some resource. Send a QUIT (sig 3) to the application
instead of KILL (sig 9) and that should emit a thread dump (stack trace
for every live thread) to standard output (usually redirected to
catalina.out). You can inspect it yourself to see if you can detect
anything fishy, or go ahead and post it to the list and we'll see if we
can give you any advice.

The fact that a previous developer mentioned off-hand that "something
might be wrong with the memory" is not exactly encouraging, since I'm
guessing he or she didn't give you any indication of /where/ that memory
problem might be. That pretty much means that you're going to have to
start from scratch. :(

Good luck,
- -chris

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

iD8DBQFFp8ZH9CaO5/Lv0PARAjzCAJ43KFJuG6bza+zLGIAKygFJ97yAqACgw11n
bRAlQBGHIn6WlDZN0nzYyQg=
=T4kv
-END PGP SIGNATURE-

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



New Tomcat shuts down thread

2007-01-12 Thread Steve Ingraham
I have started a new thread concerning my shutdown problems as they were
addressed in the previous "tomcat shuts down" thread.  Below is the
latest reply to that thread.

Is anything flooding my server?  I don't think so.  That server only
houses our MySQL database.  Multiple users input data into it using a
web interface.  The web interface is the reason for the Tomcat set up on
this server.  I would guess that at any given time there could be a
dozen users inputting at the same time but not much more than that.  It
is possible that it is hanging due to memory usage.  The loop issue is
interesting.  What was the resolution for that?

As I stated previously I manually stop and start Tomcat every morning.
It is not that big of an inconvenience to do that in general but at the
same time I would like to know why it is doing this and resolve it.
There is something wrong with the application and fixing it would make
things run smoother.

Steve

---

Andre Prasetya wrote:

Hi Steve,

Is there anything that flood your server with requests or trigger an
infinite loop within the application ? I have similar experiences in 2
scenarios 1. A tomcat died every morning, Then we foundout that its
flooded by requests at a certain time and there is a flaw at our design
that permits only 1 connection for the flooded application. 2. An
application causing the tomcat server to hang, exhausting our cpu
resources to 100%, trigerred by Stop command from manager. Even after
shutting down the tomcat, the process is still running and we have to
manually kill the java thread. Thenwe found out that our application got
an infinite loop bug when we force it to close.

 

On 1/12/07, Steve Ingraham <[EMAIL PROTECTED]> wrote:

>

> I have a similar problem. I would be interested to know what is said 

> about this.

>

> In our case we have a web based application that calls up a MySQL 

> database. It is running in Tomcat 5.5.15 on a Red Hat AS 3 machine. 

> Every morning I have to manually stop and restart Tomcat. If I do not 

> do so and let it run, over the course of a day or two, definitely no 

> more than the third day, Tomcat will lock up and the web application 

> will display access errors to the users.

>

> I then have to run the shutdown.sh script on Tomcat. Then because the 

> instance will not clear out I have to run ps aux, find the instance of


> java that is running. I then have to run the kill -9  command 

> and then startup.sh to restart Tomcat. If I do this first thing in 

> the morning Tomcat will function without locking up. If I do not do 

> it first thing in the morning, sometime during that day, or if I am 

> lucky the next day, Tomcat will lockup.

>

> If anyone has ideas on what can be done to correct this problem I will


> be anxious to read any replies.

>

> Thanks,

> Steve

>

> -Original Message-

> From: Propes, Barry L [GCG-NAOT] [mailto:[EMAIL PROTECTED]
 ]

> Sent: Thursday, January 11, 2007 4:06 PM

> To: Tomcat Users List

> Subject: RE: Tomcat unexpectedly shuts down

>

>

> I'd find out what other major processes are running on those two UNIX 

> boxes, as it sounds like something there's clashing terribly, and 

> killing off the Tomcat process.

>

> -Original Message-

> From: Brown, Carlton [mailto:[EMAIL PROTECTED]
 ]

> Sent: Thursday, January 11, 2007 4:01 PM

> To: users@tomcat.apache.org

> Subject: Tomcat unexpectedly shuts down

>

>

> Hello,

>

> My Tomcat instance is unexpectedly shutting itself down every 8 to 72

> hours. Can someone give me some advice on this? By all appearances

> this is a graceful shutdown. I do not see any interesting exceptions 

> in the logs (I have looked in catalina.out and the various localhost*

> files). Perhaps I am looking for the wrong thing.

>

> This happens on Tomcat 4.1.31 and 5.028 on Redhat Linux and Solaris 

> 10. JSP apps running on the server are about 3 different instances of 

> Anthill 1.8.0.264.

>

> Thanks in advance,

> Carlton

>

> *

>

> The information transmitted is intended only for the person or entity 

> to which it is addressed and may contain confidential, proprietary, 

> and/or privileged material. Any review, retransmission, dissemination 

> or other use of, or taking of any action in reliance upon this 

> information by persons or entities other than the intended recipient 

> is prohibited. If you received this in error, please contact the 

> sender and delete the material from all computers. GA623

>

>

>

> -

> To start a new topic, e-mail: users@tomcat.apache.org

> To unsubscribe, e-mail: [EMAIL PROTECTED]

> For additional commands, e-mail: [EMAIL PROTECTED]

>

>

> -

> To start a new topic, e-mail: users@tomcat.apache.org

> To unsubscribe, e-mail: [EM