Java Heap Space out of memory error Tomcat6 port

Kaya Saman kayasaman at
Tue Jan 3 14:02:24 UTC 2012


I'm running FreeBSD 8.2 x64 edition with 4GB RAM on a quad core machine.

I keep getting this error:

umbers=0&rev=11.1" java.lang.OutOfMemoryError: Java heap space
Exception in thread "http-8180-Acceptor-0" java.lang.OutOfMemoryError: 
Java heap space

and essentially due to it my webapp will simply die and not work - which 
is actually xwiki.

In order to rectify the situation with the help of some Google'ing I 
added this to my file:


However, as I found out early this morning, it didn't work I had the 
same issue.

I have asked on the xwiki mailing list for any advice but it seems the 
guys there are all Linux users and can't really help me out much 
although they suggested to use:


I have tried that and although it's still too early to tell what is 
going on since the last restart was only a few hours ago but I thought 
I'd just quickly ask here and see what could be done as CATALINA_OPTS 
and JAVA_OPTS seem to be more or less the same with JAVA_OPTS also being 
used at Tomcat stop as well as start.

The odd thing is that I have tested the same webapp and DB combo on a 
PowerMac G4 running PPC edition of Fedora 11 which on a 733MHz machine 
with 384MB RAM did work fine for over a week if not a little slow.

I also tested on Nexenta Core 3 (OpenSolaris) running Glassfishv3 on a 
VM inside my notebook with 2GB dedicated RAM and that was up for several 
months even though really slow again - a while back.

Can anyone help me with figuring this out??

I mean I'm not even using swap space on my machine so it definitely has 
not run out of memory. It seems a Java option somewhere but I have no 
idea where or what.



More information about the freebsd-ports mailing list