This doesn't apply to just Tomcat, but we'll use Tomcat as an example. If get Java heap size errors along with those nasty OutOfMemoryError exceptions, here's what you need to do.
root@vps1:~# svccfg -s svc:/network/http:tomcat6 setenv JAVA_OPTS -Xmx256m
root@vps1:~# svccfg refresh svc:/network/http:tomcat6
root@vps1:~# svccfg restart svc:/network/http:tomcat6
That should do it. You can use the good old pargs [pid] command to make sure the above JAVA_OPTS were taken.
0 Responses to Tomcat and OpenSolaris... OutOfMemoryError