You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by keglius <eg...@satnet.lt> on 2007/09/25 15:30:58 UTC
Tomcat 5.0 strange crashes
Hello guys,
I have a dedicated server (AMD 3200+) with 1GB of ram running an Apache
Tomcat 5.0 version (it is integrated with Plesk).
OS: RedHat el4 (Linux 2.6.9-42.0.8.EL)
Java Servlets v2.4
MySQL: 4.1.20
Server software: Plesk version psa v8.1.0_build81070224.19 os_RedHat el4
I have my own Java application which runs on Tomcat. It uses MySQL as
database.
The Java application works fine, however sometimes Apache Tomcat 5.0 just
crashes without any reasons. We have checked all tomcat logs, thread dumps
to see if there are any errors and noticed:
one second the server runs without a problem, then another second Tomcat
just stops responding and the logs are not recorded. It looks like Tomcat
5.0 crashes without any reason.
After we restart Tomcat, the logs continue. We cannot identify the problem
which cause this.
Do you have any recommendations or ideas how we could solve this strange
Tomcat crash problem?
Please, help us.
Thanks in advance,
Egidijus
--
View this message in context: http://www.nabble.com/Tomcat-5.0-strange-crashes-tf4515602.html#a12879658
Sent from the Tomcat - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: Tomcat 5.0 strange crashes
Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: keglius [mailto:egius@satnet.lt]
> Subject: Tomcat 5.0 strange crashes
>
> The Java application works fine, however sometimes Apache
> Tomcat 5.0 just crashes without any reasons.
If you find nothing in the logs, Tomcat isn't "crashing". Since there
also don't appear to be any of the normal shutdown messages in the logs,
then it's possible that either Plesk is terminating the process or
something inside your webapp is calling the System.exit() API. You can
use a SecurityManager to disable System.exit() calls; Google for
"disable System.exit". (Checking Peter C's possibility first - it's
easier.)
- 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: Tomcat 5.0 strange crashes
Posted by keglius <eg...@satnet.lt>.
I communicated with my hosting company and I found that my server has
installed a non-standard java runtime from BEA Jrockit. As my programmer
said that it's not a native sun virtual machine
and what I found on BEA web site that if you can't make a thread dump that
means that JVM really freezes and I should contact their support. So I guess
the whole freeze happens not because of Tomcat, but JVM.
I asked my hosting company to reinstall a native Java runtime. We will see
if this helps.
Thank you for your help!
Keglius
--
View this message in context: http://www.nabble.com/Tomcat-5.0-strange-crashes-tf4515602.html#a13057846
Sent from the Tomcat - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: Tomcat 5.0 strange crashes
Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: keglius [mailto:egius@satnet.lt]
> Subject: RE: Tomcat 5.0 strange crashes
>
> What is the problem with the webserver (Tomcat 5.5)? Why does
> it crash?
You keep using the word "crash", but don't provide any evidence that the
Tomcat process is actually terminating. It's highly unlikely that
Tomcat is crashing - much more likely that your webapp is going to sleep
for any of a variety of reasons, or just shutting down via a
System.exit() call. Possible reasons include, but are not limited to,
running out of data base connections (failure to close them), deadlocks,
data at the wrong scope level, heap exhaustion...
If the Tomcat process is still around, take a thread dump and find out
where the threads are when things go to sleep. If you think the webapp
really is running out of memory, prove it by running JConsole, and if
shows heap exhaustion, run a profiler to find out where your webapp has
a memory leak.
- 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Tomcat 5.0 strange crashes
Posted by Mark Thomas <ma...@apache.org>.
keglius wrote:
> What is the problem with the webserver (Tomcat 5.5)?
Nothing
Why does it crash?
Looks like your app is using more memory than you expect.
> Do you, guys, have any suggestions which might be helpful to fix this strange
> crash problem?
Use a profiler (eg YourKit) to see where the memory is being used.
Mark
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: Tomcat 5.0 strange crashes
Posted by keglius <eg...@satnet.lt>.
Hello,
I upgraded my server with additional 1GB of RAM, so now it has 2GBs of RAM.
I tried to run the webserver stress test on my application's members area
and found that it takes around 5 minutes of stress test with 20 users to
crash Tomcat. My application is very resource intensive, however, MySQL
doesn't crash. The only problem is Tomcat stops responding.
The oom-killer was turned off, system shows that there are around 400mbs of
free RAM, no swap is used. Tomcat has 800MBs or RAM allocated to it, but I
think Tomcat would easily eat up more RAM.
What is the problem with the webserver (Tomcat 5.5)? Why does it crash? Do
you, guys, have any suggestions which might be helpful to fix this strange
crash problem?
Thank you,
Keglius
--
View this message in context: http://www.nabble.com/Tomcat-5.0-strange-crashes-tf4515602.html#a13055265
Sent from the Tomcat - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: Tomcat 5.0 strange crashes
Posted by Peter Crowther <Pe...@melandra.com>.
> From: keglius [mailto:egius@satnet.lt]
> Actually, the server almost doesn't have free memory.
> 1007.9 MB of 1011.2 MB used; 3.2 MB available RAM
OK, that's physical memory. What about swap?
> I think Tomcat is configured to always use 1GB of memory.
Then you have a problem anyway. You have 1 Gbyte of physical RAM. The
operating system and services will need a chunk of it, as will Plesk.
You're *also* allocating 1 Gbyte to Tomcat. That means that somebody
loses! If you're lucky, you have some unused memory at the top of the
Java heap. If you're unlucky, your system is paging hard as the JVM
uses physical memory it hasn't got and portions of the Java heap get
paged out. You might want to look at disk traffic to see whether this
applies.
I suggest you check your JVM to find out how much of that 1 Gbyte
allocation is actually being used. If the answer is "not much", your
system might benefit from reducing the JVM heap size. If you're using
most of that 1 Gbyte, I suggest adding RAM to the server - it's almost
certainly short of RAM.
> The server was working just fine earlier, but now within there were 3
> crashes within last 3 weeks.
Then something has changed. If memory/swap is the problem (and I'm not
sure), it could be something as simple as a RedHat patch causing a
service to occupy more memory, or someone leaving a large job suspended
in the background.
- Peter
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: Tomcat 5.0 strange crashes
Posted by keglius <eg...@satnet.lt>.
Thank you Peter and Caldarale for your answers.
I will definately check for those settings.
Actually, the server almost doesn't have free memory.
1007.9 MB of 1011.2 MB used; 3.2 MB available RAM
I think Tomcat is configured to always use 1GB of memory.
The server was working just fine earlier, but now within there were 3
crashes
within last 3 weeks.
Peter Crowther wrote:
>
>> From: keglius [mailto:egius@satnet.lt]
>> OS: RedHat el4 (Linux 2.6.9-42.0.8.EL)
>> The Java application works fine, however sometimes Apache
>> Tomcat 5.0 just crashes without any reasons.
>
> A wild stab in the dark... How much free memory do you have? I seem to
> recall DeadRat has an oom-killer in later versions, and (wrongly IMO)
> it's enabled by default. Is the OS running out of memory and killing
> the largest process it can find in order to recover?
>
> - Peter
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
--
View this message in context: http://www.nabble.com/Tomcat-5.0-strange-crashes-tf4515602.html#a12880434
Sent from the Tomcat - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: Tomcat 5.0 strange crashes
Posted by Peter Crowther <Pe...@melandra.com>.
> From: keglius [mailto:egius@satnet.lt]
> OS: RedHat el4 (Linux 2.6.9-42.0.8.EL)
> The Java application works fine, however sometimes Apache
> Tomcat 5.0 just crashes without any reasons.
A wild stab in the dark... How much free memory do you have? I seem to
recall DeadRat has an oom-killer in later versions, and (wrongly IMO)
it's enabled by default. Is the OS running out of memory and killing
the largest process it can find in order to recover?
- Peter
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org