I had a similar problem on RH EL just a couple of weeks ago. Might not be
the same as yours, though, because in my case apache wasnt hung, just
tomcat. but that might just be a difference in versions, so i'll share it
anyway.

Here's what i did..

I used kill -QUIT on the tomcat process after it had hung to find a stack
trace of the tomcat threads. This showed that every thread was blocked on a
synchronized statement in program code. I investigated it (thoroughly!) and
concluded that there is a bug in the JVM on this OS related to synchronized
statements, only manifesting itself occasionally and under certain
conditions. I refactored my code slightly around this and it appears to have
fixed the problem.

I'd be interested in hearing how it works out for you.

-----Original Message-----
From: Sean Finkel [mailto:[EMAIL PROTECTED]
Sent: Thursday, 26 August 2004 2:07 AM
To: Tomcat User
Subject: Tomcat causes Apache to hang. Any ideas?


Hello,
First a brief background on the setup:
We are running Apache 1.3.31 utilizing mod_jk (not jk2). We are running 
two instances of Tomcat. Previously, both were version 4. Currently, we 
have one shared instance running the latest 5.x release (just compiled 
yesterday). We have one customer running a private 4.x instance.

With that said, we just moved to a new server (Dual Xeon, RHEL 3.0) and 
now the problem we are having is the customer who has this private 
instance has jsp pages that "hang". But, it does not hang all the time. 
What's weird, is most of the time, I can stop the shared instance and 
the customer's pages will stop hanging. I would like to fix the hanging 
completely, obviously.

Today though, the only thing that kept his pages from hanging was a full 
reboot. I am wondering if this is related to swap space usage. I don't 
know what else it would be, as I stopped/started his tomcat and apache 
numerous times. I tried using a different connector (AJP instead of Coyote).

Could this last problem be due to running tomcat5 *and* tomcat 4? I 
would say no, as that makes no sense this would be the case, especially 
when it (still)occurred after stopping the Tomcat 5 instance.

Essentially what happens is, Apache receives the request for the page, 
hands it off to Tomcat, tomcat returns half of the page (header/left 
menu) and just sits there. Hitting "stop" on the browser stops the 
transfer, however Tomcat never releases the Apache process. So we end up 
with dozens, sometimes hundreds of Apache processes that are "hung" by 
tomcat. This results in memory usages exceeding 2gb!

Has anyone experienced similar problems or have any suggestions?

-Sean Finkel


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

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

Reply via email to