On 01/03/2012 12:35 AM, Kaya Saman wrote:
On 01/03/2012 07:30 AM, Sergiu Dumitriu wrote:
On 01/03/2012 12:13 AM, Kaya Saman wrote:
Hi,

first up Happy New Year to everyone :-)

Secondly, I've been trying to stabilize my Xwiki install on FreeBSD 8.2
x64. My machine is a quad core box with 4GB RAM and not much usage in
terms of people viewing the wiki etc....

I am 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


I have attempted a resolution by including: - after Google'ing heavily
to see what could be done to rectify the issue.

JAVA_OPTS=-Xmx1024m
JAVA_OPTS=-Xms1024m
#JAVA_OPTS=-XX:PermSize=64M
#JAVA_OPTS=-XX:MaxPermSize=256m

at the top of the catalina.sh file but as I've just found out it didn't
work.


The strange thing is that I had this wiki migrated to an old PowerMac G4
733MHz with 384MB RAM and even though the cpu went up to max due to the
amount of swap space consumed the system still worked fine for longer
then my BSD machine at least.

Can anyone give me a hand in order to diagnose the problem?


I have tried this also on Nexenta Core 3 (OpenSolaris) on a virtual
machine running on my notebook with 2GB RAM dedicated to it which worked
fine also and was up for many weeks even though pathetically slow.....
actually I was running Glassfishv3 but it was still Java!


Thanks,

Indeed, the proper fix is to increase the amount of memory that the
JVM can use, and it should be done with the -Xmx1024m parameter as you
tried. And that value should be enough. Seeing that it doesn't work,
then catalina.sh must somehow discard that JAVA_OPTS variable along
the way. To test it, just do a ps or top after Tomcat is started to
see exactly what command line is being executed; does it have your Xmx
setting or not?

Anyway, I don't know how FreeBSD packages Tomcat, but normally you
shouldn't edit catalina.sh directly, there should be a dedicated
configuration file where you can specify parameters. On my Gentoo it's
in /etc/conf.d/tomcat-6. And the recommended variable to set is
CATALINA_OPTS, not JAVA_OPTS, and catalina.sh should append whatever
you set in CATALINA_OPTS to the final JAVA_OPTS that it computes and
which gets passed to the java command.

Thanks for that!

I've just changed the option to CATALINA_OPTS from JAVA_OPTS and see if
that works....

running ps aux gave me this output but nothing substantial:

The lines get trimmed if you get the output directly from the console, you should either pipe it to less, or redirect to a file that you can inspect later.

USER PID %CPU %MEM VSZ RSS TT STAT STARTED TIME COMMAND
www 49976 26.5 2.6 313592 106244 ?? SsJ 5:31AM 0:07.31
/usr/local/diablo-jdk1.6.0/bin/java -
root 55971 0.0 0.0 5864 528 ?? SsJ Fri04PM 0:00.45 /usr/sbin/syslogd -s
pgsql 56160 0.0 0.0 46296 624 ?? IsJ Fri04PM 0:00.24
/usr/local/bin/postgres -D /usr/local
pgsql 56162 0.0 0.0 46296 1708 ?? SsJ Fri04PM 0:17.84 postgres: writer
process (postgres
pgsql 56163 0.0 0.0 18256 252 ?? SsJ Fri04PM 0:01.60 postgres: stats
collector process
root 56196 0.0 0.0 10952 1044 ?? SsJ Fri04PM 0:03.36 sendmail: accepting
connections (send
smmsp 56200 0.0 0.0 10952 764 ?? IsJ Fri04PM 0:00.07 sendmail: Queue
runner@00:30:00 for /
root 56206 0.0 0.0 6920 860 ?? SsJ Fri04PM 0:00.58 /usr/sbin/cron -s
root 48393 0.0 0.1 9252 2124 1 SJ 5:01AM 0:00.02 tcsh
root 50053 0.0 0.0 6976 984 1 R+J 5:32AM 0:00.00 ps aux


I have been told that FreeBSD has always had issues with Java so I'm not
quite sure if that's what is happening here but for some reason Tomcat
keeps quitting.

If whatever I try doesn't work I guess I may have to create a cron job
that will restart Tomcat everyday as then I'm less likely to encounter
this error? - nasty but am out of options.

--
Sergiu Dumitriu
http://purl.org/net/sergiu/
_______________________________________________
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to