how to make war file take up less memory

Posted by Myy on Stack Overflow See other posts from Stack Overflow or by Myy
Published on 2012-08-28T15:31:38Z Indexed on 2012/08/28 15:38 UTC
Read the original article Hit count: 263

Filed under:
|
|
|

I need help on how to decrease the memory usage of my web app. so I can fit more into my webserver.

so I'm building a java web app with JSF 2.0 developing in eclipse helios and running on an Apache tomcat Server. And I have a dedicated virtual server with a tomcat aswell where I deploy these war files. the webApp is about 35MB in size ( it has a lot of jars and such) but when I deploy it to my tomcat webserver, I can see it takes about 300MB of RAM, is this normal? my dedicated server only has 2GB of ram from which normally have 1 to use. so I as soon as I deploy 3 apps I get an OOM error, I've gotten permgen OOM and a out of swamp Memory error; to fix this I upped my MaxPermGen to about a gig and resytarted the server to get back some swamp space. so I tried deploying smaller older apps ( about 15MB) and they take up waay less memory. If I have 1 GB of ram I want to be able to fit more apps into my webserver without getting any OOM Errors.

now I found this stack overflow Question, Can that be applied to my case? and if so, which are the common folders in the tomcat server? anyone done this before or have a different more effective, not so complicated approach?

Any ideas, and or commets are more than appreciated. Thanks!

Myy

© Stack Overflow or respective owner

Related posts about java

Related posts about tomcat7