1

I'm currently deploying to a VPS where I'm using Tomcat 7 and I'm seeing lots of complaints deploying the most Barebones grails app, e.g.:

  SEVERE: The web application [/BareBones-0.1] appears to have started a thread named [Timer-1]  but has failed to stop it. This is very likely to create a memory leak.
  Feb 8, 2012 4:32:53 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
  SEVERE: The web application [/BareBones-0.1] appears to have started a thread named [H2 Log Writer PRODDB] but has failed to stop it. This is very likely to create a memory leak.
  Feb 8, 2012 4:32:53 AM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
  SEVERE: The web application [/BareBones-0.1] appears to have started a thread named [H2 Log Writer PRODDB] but has failed to stop it. This is very likely to create a memory leak.

Additionally, I often run out of memory just re-deploying a WAR file, even though I have 1GB dedicated and 2 GB Burst. E.g. when I run the Tomcat stop command, I get:

 java.lang.OutOfMemoryError: PermGen space

on the stop.

So, I'm wondering if anyone can give me a pointer as to whether I might see less problems with Jetty in their experience. My final web app won't be a very large / heavy traffic site.

John Saunders
  • 160,644
  • 26
  • 247
  • 397
Ray
  • 5,885
  • 16
  • 61
  • 97

1 Answers1

2

It's known Tomcat issue, happens very-very often (actually I never saw any app without such problem). It means that there is something wrong with your app, or (more common) with a library that your app is using. There is a list of 'well-known mistakes' - http://wiki.apache.org/tomcat/OutOfMemory

Btw, sometimes it's much easier to restart Tomcat on deploy, instead of using hot-deploy.

Igor Artamonov
  • 35,450
  • 10
  • 82
  • 113
  • I guess I'm surprised to have these kinds of errors with the most bare bones (Grails) app. Do you know how Jetty compares to Tomcat? – Ray Feb 08 '12 at 06:57
  • Yes, even simple app can have such problem (and as for me - it's Tomcat's fault). I've used Jetty only for development, and can recommend it there, and never used Jetty in production, but I heard few times that it's working well. – Igor Artamonov Feb 08 '12 at 07:06
  • ... so why do people go with Tomcat? Because it's "older, more established"? – Ray Feb 08 '12 at 07:31
  • Heh, good question! :) Yes, I think because it's old, well known, mentioned in every book, etc, etc. – Igor Artamonov Feb 08 '12 at 08:00
  • Thanks, good reference. Certainly look like folks gave a lot of up votes because they agree with the answer (rather than its quality in regard to detailed info). – Ray Feb 08 '12 at 17:16