Page 1 of 1

java.lang.OutOfMemoryError

PostPosted: Tue Apr 12, 2011 11:33 am
by stebbi67
Hi all.

I have to admit that I gave up searching for the answer on forums. When I search for java.lang.OutOfMemoryError it looks for java and/or lang and/or OutOfMemoryError. Blame it on my lack of knowledge how to use the search tool.

Enough about that. I have this java memory issue on my ubuntu server and to increase the available memory allocation for java I have to give this command :

java -Xmx<size>m -jar yourjarfile.jar

The question is which jar file should I include in the command?

PostPosted: Tue Apr 12, 2011 3:41 pm
by jaquense
are you running a Standalone Install or the .war with Tomcat?

Standalone Install (.deb)
to increase Standalone memory on Ubuntu
Code: Select all
sudo gedit /etc/default/subsonic

follow the comment in the file to increase memory ex:
Code: Select all
SUBSONIC_ARGS="--max-memory=512"


Tomcat WAR Install
for increasing Tomcat memory you add that java option to the JAVA_OPTS path. I did it via the tomcat6 start script
Code: Select all
sudo gedit /etc/init.d/tomcat6

and add the below anywhere
Code: Select all
export JAVA_OPTS="-Xmx512m"

all of this increase the max memory to 512 which may be to much for your needs you can put what ever you want in (128, 256, etc)