Date: Tue, 3 Jan 2012 18:49:59 +0200 From: George Liaskos <geo.liaskos@gmail.com> To: Kaya Saman <kayasaman@gmail.com> Cc: ports@freebsd.org Subject: Re: Java Heap Space out of memory error Tomcat6 port Message-ID: <CANcjpOAyngNCUymHOLt0Jf5ihXC=acPOJ_ZQwPow=5eMTHjXrw@mail.gmail.com> In-Reply-To: <4F0303DE.5030101@gmail.com> References: <4F0303DE.5030101@gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Jan 3, 2012 at 3:34 PM, Kaya Saman <kayasaman@gmail.com> wrote: > Hi, > > 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 Catalina.sh file: > > > > JAVA_OPTS=-Xmx1024m > JAVA_OPTS=-Xms1024m > #JAVA_OPTS=-XX:PermSize=64M > #JAVA_OPTS=-XX:MaxPermSize=256m > > > 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: > > CATALINA_OPTS instead of JAVA_OPTS. > > > 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. > > > Thanks, > > > Kaya Hello, Try to set tomcat6_java_opts in your rc.conf, the rc script lists the available configuration options. I have the following in my home server: 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"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANcjpOAyngNCUymHOLt0Jf5ihXC=acPOJ_ZQwPow=5eMTHjXrw>