Dear All, I am running Tomcat 8 on Ubuntu. After a few days of running successfully my Tomcat's JVM crashes or becomes absolutely unresponsive because of OOME errors similar to this in catalina.out: --- cut ------- SEVERE:Memory usage is low, parachute is non existent, your system may start failing. java.lang.OutOfMemoryError: Java heap space SEVERE:Memory usage is low, parachute is non existent, your system may start failing. java.lang.OutOfMemoryError: Java heap space SEVERE:Memory usage is low, parachute is non existent, your system may start failing. java.lang.OutOfMemoryError: Java heap space SEVERE:Memory usage is low, parachute is non existent, your system may start failing. java.lang.OutOfMemoryError: Java heap space SEVERE:Memory usage is low, parachute is non existent, your system may start failing. java.lang.OutOfMemoryError: Java heap space SEVERE:Memory usage is low, parachute is non existent, your system may start failing. java.lang.OutOfMemoryError: Java heap space: failed reallocation of scalar replaced objects
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "http-nio-80-exec-2" --- cut ------- My webapp used to run on Openshift v2. It only supported JRE 1.7 and some Tomcat 7. Openshift v2 closed and I have moved to Google Compute Engine and has been struggling since then running Tomcat 8 there. At first I was using GCE micro instance with 600MB of RAM. Soon I started having problems when Linux was killing Tomcat (OOM killer) as it considered its JVM as a candidate for killing or if I specify a lower maximum heap size I would eventually get OOME from JVM. I moved to a GCE small instance which has 1.7GB of RAM but the problem still occurs eventually though a bit later than on the 600MB VM because I somewhat increased the maximum heap size. It is strange because my webapp was running fine on Openshift though it was Tomcat 7. I did not make any considerable changes to server.xml (with the exception of those necessary to use Tomcat 8), I attach my server.xml too. I read Tomcat's FAQ, Wiki pages and searched mailing lists but nothing seems to fit my case. I would accept the fact that my application has a memory leak problem but it is absolutely unclear from this picture that it has one. I have tried using Eclipse MAT to see what might be causing this and I attach 2 screenshots that show that the majority of heap is occupied by RequestInfo instances. I would be really grateful if someone could take a look and tell me what might be happening there. Looking forward to your reply. Best regards, Ivan ============================================================================= My current environment: g1-small 1 CPU which has 1.7GB RAM Tomcat 8.0.32 (8.0.32-1ubuntu1.5) on Ubuntu 16.04.1. $ java -version openjdk version "1.8.0_151" OpenJDK Runtime Environment (build 1.8.0_151-8u151-b12-0ubuntu0.16.04.2-b12) OpenJDK 64-Bit Server VM (build 25.151-b12, mixed mode) $ less /var/lib/tomcat8/bin/setenv.sh JAVA_OPTS="-Dlog4j.logging.dir=$CATALINA_BASE/logs \ -Dlogging.dir=$CATALINA_BASE/logs \ -Djava.awt.headless=true \ -Xms220M \ -Xmx220M \ -Dsun.java2d.cmm=sun.java2d.cmm.kcms.KcmsServiceProvider \ -Djava.security.egd=file:/dev/./urandom \ -XX:+HeapDumpOnOutOfMemoryError \ -XX:HeapDumpPath=$CATALINA_BASE/logs/java_pid%p.hprof"
<?xml version='1.0' encoding='utf-8'?> <Server port="8005" shutdown="SHUTDOWN"> <Listener className="org.apache.catalina.startup.VersionLoggerListener" /> <Listener className="org.apache.catalina.security.SecurityListener" minimumUmask="" /> <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" /> <Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" /> <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" /> <Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" /> <Service name="Catalina"> <Connector port="80" protocol="HTTP/1.1" connectionTimeout="3000" redirectPort="443" /> <Connector port="443" protocol="org.apache.coyote.http11.Http11NioProtocol" maxThreads="150" SSLEnabled="true" scheme="https" secure="true" clientAuth="false" sslProtocol="TLS" KeystoreFile="***" KeystorePass="***"/> <Engine name="Catalina" defaultHost="localhost"> <Host name="localhost" appBase="webapps" unpackWARs="true" autoDeploy="true"> <Valve className="org.apache.catalina.valves.RemoteIpValve" protocolHeader="x-forwarded-proto" ></Valve> <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" prefix="localhost_access_log." suffix=".log" requestAttributesEnabled="true" pattern="combined" /> </Host> </Engine> </Service> </Server>
--------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org