java.lang.OutOfMemoryError

Need help? Post your questions here.

Moderator: moderators

java.lang.OutOfMemoryError

Postby stebbi67 » Tue Apr 12, 2011 11:33 am

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?
stebbi67
 
Posts: 9
Joined: Fri Jan 25, 2008 8:53 am

Postby jaquense » Tue Apr 12, 2011 3:41 pm

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)
jaquense
 
Posts: 47
Joined: Tue Dec 28, 2010 7:06 pm


Return to Help

Who is online

Users browsing this forum: No registered users and 37 guests