Java Heap Space out of memory error Tomcat6 port

Kaya Saman kayasaman at
Tue Jan 3 18:02:42 UTC 2012

On 01/03/2012 07:31 PM, George Liaskos wrote:
> On Tue, Jan 3, 2012 at 7:07 PM, Kaya Saman<kayasaman at>  wrote:
>> On 01/03/2012 06:49 PM, George Liaskos wrote:
>>> tomcat55_java_opts="-Djava.awt.headless=true -Dfile.encoding=UTF-8
>>> -server -Xms1536m -Xmx1536m -XX:NewSize=256m -XX:MaxNewSize=256m
>>> -XX:PermSize=256m -XX:MaxPermSize=256m -XX:+DisableExplicitGC"
>> Thanks for that!
>> I copied and pasted the java_opts of yours into my rc.conf and changed the
>> tomcat55 to tomcat6 then restarted.
>                                 ^^
>  From what i read in the rc script, this should be tomcat60_java_opts.
> Regards,
> George
Yeah, I got it working.......

I eventually added:

tomcat60_java_opts="-Djava.awt.headless=true -Dfile.encoding=UTF-8 
-server -Xms3072m -Xmx3072m -XX:NewSize=256m -XX:MaxNewSize=256m 
-XX:PermSize=256m -XX:MaxPermSize=256m -XX:+DisableExplicitGC"

Basically the -Xms and -Xmx values needed to be set to 3GB......

Now all is fine even though swap is heavily used but I guess that's Java!

Thanks :-)



More information about the freebsd-ports mailing list