App Server eating memory

Hi!

I am using Sun Appserver 9 (first customer ship) with one EJB-JAR collection. It contains about 15 persistent Entity classes, 5 Stateless Session beans und 1 stateless webservice bean. Further resources are one MySQL jdbc datasource and one JavaMail session.

My test server has 512MB of physical memory. The MySQL daemon is also running no the same machine (it uses about 5% of memory). When starting the appserver, it first uses about 15% of memory, after deploying the ejb-jar it increases to about 40% and when invoking the webservice memory usage increases to 80%. After some webservice invocations I sometimes get an out of memory error and the server must be restarted.

How can memory usage be improved?

[739 byte] By [batzee] at [2007-11-26 10:37:27]
# 1

I would say your best option would be adding RAM to your machine. 512Mb is a minimum memory requirement when running appserver 9, see http://docs.sun.com/app/docs/doc/819-3653/6n5s0v1qd?a=view

Recommended memory should be 1Gb for all unix platforms, I am not sure why it states 512Mb for Solaris.

Anyway, all you can do to minimize appserver memory need is to play around with JVM options, i.e decrease Xms and Xmx values. Please note that too low values can lead to appserver failing to start or unpredictable crashes.

Sultal at 2007-7-7 2:48:29 > top of Java-index,Application & Integration Servers,Application Servers...