Tomcat 5.5.x and 6.0.x
Grails 1.6.x
Java 1.6.x
OS CentOS 5.x (64 bit)
VPS server with memory as 384M
JAVA_OPTS: tried many combinations, including the following
export JAVA_OPTS = '- Xms128M -Xmx512M -XX: MaxPermSize = 1024m'
export JAVA_OPTS = '- server -Xms128M -Xmx128M -XX: MaxPermSize = 256M'
(As recommended by http://www.grails.org/Deployment )
I created an empty Grails application by simply providing the grails create-app command and then WARed it
I am running Tomcat on a VPS server
When I simply start the Tomcat server without deploying the applications, the free memory is about 236M and the used memory is about 156 M.
When I deploy my βemptyβ application, the memory consumption increases to 360 M, and finally, the Tomcat instance is killed as soon as it takes up all the free memory
As you saw, my application is as light as possible.
Not sure why memory consumption is so high.
I was really looking for a real application, but narrowed down to this scenario, which is easier to share and explain.
UPDATE I tested the same "empty" application on my local Tomcat 5.5.x on Windows and it worked fine
Java process memory consumption captured from 32 M to 107 M. But it did not crash and remained within acceptable limits
So, the hunt for the answer continues ... Interestingly, something is wrong in my Linux box. Not sure though ...
UPDATE 2 See Also http://www.grails.org/Grails+Test+On+Virtual+Server
This confirms my belief that my simple application should work on my configuration.