Setting Java Memory Limit

Heya,

I own a VPS which I've manage to install java with no problems occuring.

I only have a 256mb RAM allocation with up to 512 burstable on my server - however I'm getting this very common error:

Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.

So I did some research and found this page: http://www.boonex.com/trac/ray/wiki/RayServerInstall

And followed this step:

Edit the file red5.sh. Find the line containing this text:

exec $JAVA -Djava.security.manager-Djava.security.policy=conf/red5.policy -cp red5.jar:conf:$CLASSPATHorg.red5.server.Standalone

and replace it with:

exec $JAVA –Xint –Xms8M –Xmx16M -Djava.security.manager -Djava.security.policy=conf/re

However I think the article is a little bit out of date since the line just did not exist so I played around with things and manage to come up with.

# JAVA options
# You can set JAVA_OPTS to add additional options if you want
# Set up logging options
LOGGING_OPTS="-Dlogback.ContextSelector=org.red5.logging.LoggingContextSelector -Dcatalina.useNaming=true" "exec $JAVA –Xint –Xms8M –Xmx70M"
# Set up security options
SECURITY_OPTS="-Djava.security.debug=failure"
export JAVA_OPTS="$LOGGING_OPTS $SECURITY_OPTS $JAVA_OPTS"

if [ -z "$RED5_MAINCLASS" ]; then
export RED5_MAINCLASS=org.red5.server.Bootstrapfi

I'm not sure if that's right, I get errors and flooded crap coming through the SSH and it ended up crashing my server because it sucked up too much memory. Is this right? ^

Or is it something I need to add to this prompt below?

# start Red5
echo "Starting Red5"
exec "$JAVA" "$JYTHON" -Dred5.root="${RED5_HOME}" $JAVA_OPTS -cp "${RED5_CLASSPATH}" "$RED5_MAINCLASS" $RED5_OPTS

Thanks in advance!

Quote · 25 May 2009

Anyone?

Quote · 26 May 2009

maybe in php.ini you can put the 8 to 16 i do not remember exactly where it is to change it

 unfortunetly been awile since i did this.

 

tell me what dolphin number you are running and everything from ground zero that you installed ?

Quote · 27 May 2009

maybe in php.ini you can put the 8 to 16 i do not remember exactly where it is to change it

unfortunetly been awile since i did this.

tell me what dolphin number you are running and everything from ground zero that you installed ?

php.ini isn't the source of the problem. The problem is Java related not php, javascript etc related.

If I was unclear in the previous post I'm installing RMS on my server and I need assistance in setting a memory cap on how much memory the Java software on my server can use.

The tutorial (which I posted the link) is out of date therefore that method of setting the memory cap no longer applys to the recent version. :)

Thanks!

Quote · 28 May 2009
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.