Tomcat keeps crashing on low activity site, any suggestions?

Discussion in 'Java' started by Berlin Brown, Oct 12, 2007.

  1. Berlin  Brown

    Berlin Brown Guest

    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
     
    Berlin Brown, Oct 12, 2007
    #1
    1. Advertising

  2. On Oct 12, 2:08 pm, 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.
    >
    > 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
     
    Manish Pandit, Oct 12, 2007
    #2
    1. Advertising

  3. Berlin  Brown

    Berlin Brown Guest

    On Oct 12, 6:36 pm, Manish Pandit <> wrote:
    > On Oct 12, 2:08 pm, 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.

    >
    > > 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.
     
    Berlin Brown, Oct 13, 2007
    #3
  4. 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
     
    Mark Clements, Oct 13, 2007
    #4
  5. Berlin  Brown

    Roedy Green Guest

    On Fri, 12 Oct 2007 14:08:40 -0700, Berlin Brown
    <> 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
     
    Roedy Green, Oct 14, 2007
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. ruxandra
    Replies:
    0
    Views:
    590
    ruxandra
    Apr 14, 2009
  2. zyraco
    Replies:
    0
    Views:
    1,725
    zyraco
    Nov 10, 2009
  3. zyraco
    Replies:
    0
    Views:
    1,074
    zyraco
    Nov 10, 2009
  4. zyraco
    Replies:
    0
    Views:
    1,326
    zyraco
    Nov 10, 2009
  5. Ash Courchene

    Tkinter, IDLE keeps crashing

    Ash Courchene, Feb 17, 2013, in forum: Python
    Replies:
    5
    Views:
    164
    Ned Deily
    Feb 18, 2013
Loading...

Share This Page