I'm hosting a java server application on a Linux Root-Server.

My problem is, that sometimes the server takes more RAM than the allocated maximum, which leads to an automatic process kill (crash).

That's my start-script:

nohup java -Xmx900m -Xms900m -XX:MaxPermSize=128m -jar -Xss1m jar-file.jar &

As you can see, I also set the minimum and maximum RAM (-Xms900, -Xmx900m), so there shouldn't be a problem.

Does anyone know what I'm doing wrong? If yes, please tell me and show me an "improved start script".

Best wishes, Ishidres

1 Answer 1


In fact Xms and Xmx determine the lmit of the heap size but there other memory regions : Stack (Xss x Number of Threads) + PermGen + CodeCahe (48MB by default in Java 7 ) + Direct Memory.

In general,those add approximately 1/2 GB if there no specifications.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.