views:

48

answers:

1

Hi, has anybody worked with a Grails application in production in Jetty and Tomcat and has noticed any important differences ? I started having out of memory problems with tomcat 6.0.24 that were fixed when I updated to 6.0.26, and I was wondering if Jetty had that kind of issues too.

A: 

I have noticed problems were Tomcat sucks and Jetty doesn't:

Problem 1: Tomcat seems to have hot deployment memory leak (at least prior to version 7) compared to Jetty. If you hot deploy a few times the permgen space grows with each deploy. Possible solutions:

  • increase permgen space (temporary fix): -XX:PermSize=SIZE, -XX:MaxPermSize=SIZE (in sun jvm)
  • stop tomcat and deploy

Problem2: Tomcat doesn't put parameters in the payload section of a http PUT request. To get around this problem you can do one of following:

  • use POST instead (this imo is a hack)
  • read and parse the parameters using inpustream
  • pass the parameters through url
numes