Can't start the Java Virtual Machine - memory problem?
Hi all,
Basically I can't start the JVM on a remote dedicated Debian server. I am using SSH to issue the commands, there is no desktop UI. The error I'm getting is: Code:
Error occurred during initialization of VM Code:
total used free shared buffers cached Any help is appreciated, thanks! |
Sounds like the initial size of the heap, specified with -Xmx is too large for your machine. Look in the catalina.sh to see if there is a value specified. It should be assigned to the JAVA_OPTS variable.
|
crabboy, thanks for your suggestion.....
the catalina.sh script calls a script that runs this command (sets environment variables): Code:
JAVA_OPTS="$JAVA_OPTS -Xmx1024m -XX:MaxPermSize=256m -Dfile.encoding=UTF8 -Duser.timezone=GMT -Djava.security.auth.login.config=$CATALINA_HOME/conf/jaas.config -Dorg.apache.catalina.loader.WebappClassLoader.ENABLE_CLEAR_REFERENCES=false" |
You can try a lower number like 512M and see if it helps, but I don't see a problem with the way it is now. That allows the JVM to start small and allocate up to 1G of RAM. What version of java are you using?
java --version |
thanks crabboy,
I tried lowering it to a lot of different values. 512M did get past the first VM error and it tried to start, but it went on to have more memory problems 'Cannot allocate memory'. The Liferay software wasn't functional - tried to get to the portal homepage on localhost:8080 but it just hung. A couple of times the server went unstable, refusing all commands and eventually kicking me out of SSH and not letting me back on. Had to log onto plesk to kill the java process before it would let me back on SSH. Edit: java version is latest (6.x I think), I downloaded and installed the latest JRE and JDK. Oh also.. I actually think it might be a Fedora server now, but not 100% sure. |
does the user that you're using have any ulimits set?
$ ulimit -a If there are memory limits, set them to unlimited. I don't see why the system would hang and you'd get thrown out though. What does top look like when you start tomcat? |
All times are GMT -5. The time now is 10:27 PM. |