Tomcat keeps crashing on low activity site, any suggestions?

B

Berlin Brown

I have a Tomcat based site, that receives about 4000 requests a day.
It is a low memory server with only 350MB of ram. But I would think
that that even Tomcat should be able to handle that. Anyway, I keep
getting out of memory errors and the JVM will normally quit after it
reaches a certain threshold. I want to post this and see if it rings
a bell with anyone. I am currently using LambdaProbe(tomcat probe) to
collect memory utilization, memory statistics.

Application itself.
Spring2, Hibernate3, MySQL5 based application.
Java(TM) 2 Runtime Environment, Standard Edition 1.5.0_08-b03 Java
HotSpot(TM) Server VM)
Linux (unknown) i386 2.6.9-023stab043.1-enterprise
Apache Tomcat/5.5.20

Here are some memory stats from Lambda Probe. These are stats while
the application is running. I am assuming relative to the heap? as
opposed to the system memory.

Current memory usage is 42.8%
Free: 89.51 MB Total: 197.94 MB Max: 253.19 MB

Name Usage score Plot Used Committed Maximum Initial Group
Survivor Space 1.09Mb 2.19Mb 2.81Mb 2.19Mb HEAP
Perm Gen 45.98Mb 46.00Mb 64.00Mb 16.00Mb NON_HEAP
Tenured Gen 106.23Mb 177.81Mb 227.56Mb 177.81Mb HEAP
Eden Space 12.61Mb 17.94Mb 22.81Mb 17.81Mb HEAP
Code Cache 10.17Mb 10.19Mb 48.00Mb 2.25Mb NON_HEAP
Total 176.09Mb 254.13Mb 365.19Mb 216.06Mb TOTAL

I am also assuming that when the "Free" memory reaches 0, that the JVM
will crash. I can't tell because the probe application is running
inside of that jvm.

Here is an error from the logs when the jvm stops.

Key line = "JVM exited unexpectedly while stopping the application."


INFO | jvm 1 | 2007/10/12 14:23:22 | 2007-10-12 14:23:22,183 INFO
[org.spirit.spring.BotListRubyController] - <BotListRubyController:
showForm() uri=/botlist/spring/botverse/linkaddcomment.html>
INFO | jvm 1 | 2007/10/12 14:23:22 | 2007-10-12 14:23:22,183 INFO
[org.spirit.spring.BotListRubyController] - <BotListRubyController:
getDefaultViewNameFromRequest() - From Request:
http://www.botspiritcompany.com/botlist/spring/botverse/linkaddcomment.html>
ERROR | wrapper | 2007/10/12 14:23:26 | JVM exited unexpectedly
while stopping the application.
STATUS | wrapper | 2007/10/12 14:23:26 | <-- Wrapper Stopped


STATUS | wrapper | 2007/10/12 15:05:03 | --> Wrapper Started as
Daemon
STATUS | wrapper | 2007/10/12 15:05:03 | Launching a JVM...



Berlin Brown
 
M

Manish Pandit

I have a Tomcat based site, that receives about 4000 requests a day.
It is a low memory server with only 350MB of ram. But I would think
that that even Tomcat should be able to handle that. Anyway, I keep
getting out of memory errors and the JVM will normally quit after it
reaches a certain threshold. I want to post this and see if it rings
a bell with anyone. I am currently using LambdaProbe(tomcat probe) to
collect memory utilization, memory statistics.

Application itself.
Spring2, Hibernate3, MySQL5 based application.
Java(TM) 2 Runtime Environment, Standard Edition 1.5.0_08-b03 Java
HotSpot(TM) Server VM)
Linux (unknown) i386 2.6.9-023stab043.1-enterprise
Apache Tomcat/5.5.20

Here are some memory stats from Lambda Probe. These are stats while
the application is running. I am assuming relative to the heap? as
opposed to the system memory.

Current memory usage is 42.8%
Free: 89.51 MB Total: 197.94 MB Max: 253.19 MB

Name Usage score Plot Used Committed Maximum Initial Group
Survivor Space 1.09Mb 2.19Mb 2.81Mb 2.19Mb HEAP
Perm Gen 45.98Mb 46.00Mb 64.00Mb 16.00Mb NON_HEAP
Tenured Gen 106.23Mb 177.81Mb 227.56Mb 177.81Mb HEAP
Eden Space 12.61Mb 17.94Mb 22.81Mb 17.81Mb HEAP
Code Cache 10.17Mb 10.19Mb 48.00Mb 2.25Mb NON_HEAP
Total 176.09Mb 254.13Mb 365.19Mb 216.06Mb TOTAL

I am also assuming that when the "Free" memory reaches 0, that the JVM
will crash. I can't tell because the probe application is running
inside of that jvm.

Here is an error from the logs when the jvm stops.

Key line = "JVM exited unexpectedly while stopping the application."

INFO | jvm 1 | 2007/10/12 14:23:22 | 2007-10-12 14:23:22,183 INFO
[org.spirit.spring.BotListRubyController] - <BotListRubyController:
showForm() uri=/botlist/spring/botverse/linkaddcomment.html>
INFO | jvm 1 | 2007/10/12 14:23:22 | 2007-10-12 14:23:22,183 INFO
[org.spirit.spring.BotListRubyController] - <BotListRubyController:
getDefaultViewNameFromRequest() - From Request:http://www.botspiritcompany.com/botlist/spring/botverse/linkaddcommen...>
ERROR | wrapper | 2007/10/12 14:23:26 | JVM exited unexpectedly
while stopping the application.
STATUS | wrapper | 2007/10/12 14:23:26 | <-- Wrapper Stopped

STATUS | wrapper | 2007/10/12 15:05:03 | --> Wrapper Started as
Daemon
STATUS | wrapper | 2007/10/12 15:05:03 | Launching a JVM...

Berlin Brown

You may consider running MySQL on some other box to save memory for
Tomcat. Also, run 'top' to see which processes are taking significant
amount of memory. You can tune the server to not start the demon
processes that are not needed (like nfsd, mountd, etc.).

-cheers,
Manish
 
B

Berlin Brown

I have a Tomcat based site, that receives about 4000 requests a day.
It is a low memory server with only 350MB of ram. But I would think
that that even Tomcat should be able to handle that. Anyway, I keep
getting out of memory errors and the JVM will normally quit after it
reaches a certain threshold. I want to post this and see if it rings
a bell with anyone. I am currently using LambdaProbe(tomcat probe) to
collect memory utilization, memory statistics.
Application itself.
Spring2, Hibernate3, MySQL5 based application.
Java(TM) 2 Runtime Environment, Standard Edition 1.5.0_08-b03 Java
HotSpot(TM) Server VM)
Linux (unknown) i386 2.6.9-023stab043.1-enterprise
Apache Tomcat/5.5.20
Here are some memory stats from Lambda Probe. These are stats while
the application is running. I am assuming relative to the heap? as
opposed to the system memory.
Current memory usage is 42.8%
Free: 89.51 MB Total: 197.94 MB Max: 253.19 MB
Name Usage score Plot Used Committed Maximum Initial Group
Survivor Space 1.09Mb 2.19Mb 2.81Mb 2.19Mb HEAP
Perm Gen 45.98Mb 46.00Mb 64.00Mb 16.00Mb NON_HEAP
Tenured Gen 106.23Mb 177.81Mb 227.56Mb 177.81Mb HEAP
Eden Space 12.61Mb 17.94Mb 22.81Mb 17.81Mb HEAP
Code Cache 10.17Mb 10.19Mb 48.00Mb 2.25Mb NON_HEAP
Total 176.09Mb 254.13Mb 365.19Mb 216.06Mb TOTAL
I am also assuming that when the "Free" memory reaches 0, that the JVM
will crash. I can't tell because the probe application is running
inside of that jvm.
Here is an error from the logs when the jvm stops.
Key line = "JVM exited unexpectedly while stopping the application."
INFO | jvm 1 | 2007/10/12 14:23:22 | 2007-10-12 14:23:22,183 INFO
[org.spirit.spring.BotListRubyController] - <BotListRubyController:
showForm() uri=/botlist/spring/botverse/linkaddcomment.html>
INFO | jvm 1 | 2007/10/12 14:23:22 | 2007-10-12 14:23:22,183 INFO
[org.spirit.spring.BotListRubyController] - <BotListRubyController:
getDefaultViewNameFromRequest() - From Request:http://www.botspiritcompany.com/botlist/spring/botverse/linkaddcommen...>
ERROR | wrapper | 2007/10/12 14:23:26 | JVM exited unexpectedly
while stopping the application.
STATUS | wrapper | 2007/10/12 14:23:26 | <-- Wrapper Stopped
STATUS | wrapper | 2007/10/12 15:05:03 | --> Wrapper Started as
Daemon
STATUS | wrapper | 2007/10/12 15:05:03 | Launching a JVM...
Berlin Brown

You may consider running MySQL on some other box to save memory for
Tomcat. Also, run 'top' to see which processes are taking significant
amount of memory. You can tune the server to not start the demon
processes that are not needed (like nfsd, mountd, etc.).

-cheers,
Manish

I don't think it is the server but Tomcat. This application is really
the only one running and mysql hasn't had any problems.
 
M

Mark Clements

Berlin said:
I have a Tomcat based site, that receives about 4000 requests a day.
It is a low memory server with only 350MB of ram. But I would think
that that even Tomcat should be able to handle that. Anyway, I keep
getting out of memory errors and the JVM will normally quit after it
reaches a certain threshold. I want to post this and see if it rings
a bell with anyone. I am currently using LambdaProbe(tomcat probe) to
collect memory utilization, memory statistics.

Are you hitting the default heap size limit?

http://www.chemaxon.com/jchem/doc/admin/tomcat.html

Mark
 
R

Roedy Green

I am also assuming that when the "Free" memory reaches 0, that the JVM
will crash. I can't tell because the probe application is running
inside of that jvm.

IF GC can't free enough RAM, it has no choice but to crash.

I see two possibilities:

1. you are packratting. see
http://mindprod.com/jgloss/packratting.html

2. your app needs at minimum more RAM that you have. Try increasing
the size of the virtual RAM paging file or get more real RAM. It is
much cheaper than it used to be.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top