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 <defunct> 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** -- Do not pursue the past. Do not lose yourself in the future. The past no longer is. The future has not yet come. Looking deeply at life as it is in the very here and now, the practitioner dwells in stability and freedom. (Thich Nhat Hanh)