Debian – Tomcat crashing with no error

debianloggingtomcat

I am running tomcat 7 on debian 7.9 dedicated server with several applications running on it and last time tomcat behavior is really strange.

First after tomcat starts it takes all the assigned RAM (7 GB) and after that the RAM usage is slowly decreasing down to 5 GB and after an hour of runtime it crashes completely with no error in any of the tomcat logs (manager, access log, catalina, localhost).

This error cannot be caused by any app because I have tested them on my computer with netbeans + glassfish server and after start my apps take only 800 MB RAM not 7 GB so this has to be some kind of tomcat error.

Should I try to update to tomcat 8 ? I am not sure if it helps because like I said there is no error it just stops running and I have to start tomcat again manually.

Thanks for any tips.

Best Answer

The JVM just can't take all available RAM. Did you set something in CATALINA_OPTS, JAVA_OPTS or the startup.sh?

The parameter looks like this:

-Xms<size>

If the JVM crashes you should have a hs_err_pid file somewhere. It is usually hard to read but after some digging it has helped me in the few cases where something went wrong.

It should be in the working directory of your tomcat directory, unless otherwise set, this is CATALINA_HOME.