Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Tomcat keeps crashing on low activity site, any suggestions?

Reply
Thread Tools

Tomcat keeps crashing on low activity site, any suggestions?

 
 
Berlin Brown
Guest
Posts: n/a
 
      10-12-2007
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

 
Reply With Quote
 
 
 
 
Manish Pandit
Guest
Posts: n/a
 
      10-12-2007
On Oct 12, 2:08 pm, Berlin Brown <(E-Mail Removed)> wrote:
> 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

 
Reply With Quote
 
 
 
 
Berlin Brown
Guest
Posts: n/a
 
      10-13-2007
On Oct 12, 6:36 pm, Manish Pandit <(E-Mail Removed)> wrote:
> On Oct 12, 2:08 pm, Berlin Brown <(E-Mail Removed)> wrote:
>
>
>
> > 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.

 
Reply With Quote
 
Mark Clements
Guest
Posts: n/a
 
      10-13-2007
Berlin Brown wrote:
> 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
 
Reply With Quote
 
Roedy Green
Guest
Posts: n/a
 
      10-14-2007
On Fri, 12 Oct 2007 14:08:40 -0700, Berlin Brown
<(E-Mail Removed)> wrote, quoted or indirectly quoted someone
who said :

>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.
--
Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pcos low carb diet. Low carb diet program. Cholesterol low carb diet.Low carb diet foods. zyraco C++ 0 11-10-2009 01:44 PM
Low carb diabetes diet. Low fat high carb diet. The low carb diet.Low carb diet pregnancy. zyraco C++ 0 11-10-2009 01:44 PM
Low carb calorie diet. No low carb diet. Free low carb diet. Low carbdiet meal plan. zyraco C++ 0 11-10-2009 01:44 PM
Low Fat, Low Carb, Low Calorie and every other crazy fad diet youhave tried. ruxandra C++ 0 04-14-2009 07:00 PM
501 PIX "deny any any" "allow any any" Any Anybody? Networking Student Cisco 4 11-16-2006 10:40 PM



Advertisments