1

I was running tomcat7 production server for several days, and then suddenly it was unreachable by the http port. Strangely though, the background processes were still running as can be seen by the logs.

So i tried to stop tomcat7 using invoke-rc.d tomcat7 stop from my debian wheezy box. But still the process is still there, with the flag. I tried kill -9 <pid> and killall -9 java, but still the process is there - still occupying the port, causing me cannot start a new tomcat with the port is already used error.

I had to reboot. And everything is normal from there.

But i'm curious of what might cause this kind of situation ? There's no big loads whatsoever. Only some background processes running, scraping. I can see nothing suspicious from the logs.

What should i do if this happens again to get to the real cause and fix it ?

Here's my connector settings :

<Connector port="8080" address="127.0.0.1"
    maxParameterCount="500"
    maxPostSize="250000"
    scheme="http"
    secure="false"
    protocol="org.apache.coyote.http11.Http11AprProtocol"
    connectionTimeout="20000"
    disableUploadTimeout="false"
    connectionUploadTimeout="300000"
    maxThreads="500"
    processorCache="500"
    URIEncoding="UTF-8"
/>

My tomcat version : 7.0.28-4+deb7u1

My VM args :

JAVA_OPTS="-Djava.awt.headless=true -Dspring.profiles.active="background,production" -XX:-UseSplitVerifier -javaagent:/var/lib/tomcat7/spring-instrument-3.2.3.RELEASE.jar -server -Xms4G -Xmx4G -XX:MaxPermSize=128m -XX:+DisableExplicitGC -XX:-HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/var/log/tomcat7/dump -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:+UseTLAB -XX:+CMSIncrementalMode -XX:+CMSIncrementalPacing -XX:CMSIncrementalDutyCycleMin=0 -XX:CMSIncrementalDutyCycle=10 -XX:MaxTenuringThreshold=0 -XX:SurvivorRatio=256 -XX:CMSInitiatingOccupancyFraction=60 -Djava.net.preferIPv4Stack=true"

jdk version : 7u60

Bertie
  • 173
  • 1
  • 1
  • 7
  • Have you already checked the `tomcat` logs? – dawud Jun 28 '14 at 20:07
  • @dawud: Yes i did, on the catalina*.log and all were my background processes' logs. But i also realized i hadnt checked the localhost*.log. They're gone now after i tried re-installing a backport version of the tomcat. I will be sure to check these files if it were to happen again. For now though, i'll stress test it. – Bertie Jun 28 '14 at 20:19
  • Try to get a heap dump next time and/or a core dump. Maybe add some GC logging (e.g. via -Xloggc:/var/log/tomcat/gc.log). Also, latest Tomcat release is 7.0.55. Maybe look through release notes to see if update is warranted http://tomcat.apache.org/tomcat-7.0-doc/changelog.html. – David J. Liszewski Sep 23 '14 at 21:40

0 Answers0