I have very slow Tomcat start with app deployment.
Environment:
OS: Scientific Linux 6.3 x86_64
Java: 1.7.0_9 64bit
Tomcat: 7.0.32
startup tooks 150s and java process is at 100% CPU
I tried same webapp on another server (with same HW parameters) but on OS 32bit with java6 32bit and tomcat 7.0.19 and on this server tomcat starts in 30s.
I tried same java and same tomcat on new server without much success.
here is parts of tomcat logs when it waits for something...
FINE: Setting state for [WebappLoader[]] to [STARTING]
Nov 19, 2012 1:23:13 PM org.apache.catalina.util.LifecycleBase setStateInternal
FINE: Setting state for [WebappLoader[]] to [STARTED]
Nov 19, 2012 1:24:06 PM org.apache.catalina.util.LifecycleBase setStateInternal
FINE: Setting state for StandardEngine[Catalina].StandardHost[localhost].StandardContext[].StandardWrapper[starthead]] to [INITIALIZING]
...
Nov 19, 2012 1:24:06 PM org.apache.catalina.util.LifecycleBase setStateInternal
FINE: Setting state for [StandardEngine[Catalina].StandardHost[localhost].StandardContext[].StandardWrapper[default]] to [STARTED]
Nov 19, 2012 1:24:26 PM org.apache.catalina.util.LifecycleBase setStateInternal
FINE: Setting state for [org.apache.catalina.deploy.NamingResources@2acd47cb] to [INITIALIZING]
Nov 19, 2012 1:24:26 PM org.apache.catalina.util.LifecycleBase setStateInternal
FINE: Setting state for [org.apache.catalina.deploy.NamingResources@2acd47cb] to [INITIALIZED]
...
Nov 19, 2012 1:24:26 PM org.apache.catalina.util.LifecycleBase setStateInternal
FINE: Setting state for [Pipeline[StandardEngine[Catalina].StandardHost[localhost].StandardContext[]]] to [STARTED]
Nov 19, 2012 1:25:23 PM org.apache.catalina.util.LifecycleBase setStateInternal
FINE: Setting state for [org.apache.catalina.session.StandardManager[]] to [INITIALIZING]
Nov 19, 2012 1:25:23 PM org.apache.catalina.util.LifecycleBase setStateInternal
...
FINE: Setting state for [org.apache.catalina.session.StandardManager[]] to [STARTING]
Nov 19, 2012 1:25:23 PM org.apache.catalina.util.LifecycleBase setStateInternal
FINE: Setting state for [org.apache.catalina.session.StandardManager[]] to [STARTED]
Nov 19, 2012 1:25:43 PM org.apache.catalina.util.LifecycleBase setStateInternal
FINE: Setting state for [StandardEngine[Catalina].StandardHost[localhost].StandardContext[]] to [STARTING]
Nov 19, 2012 1:25:43 PM org.apache.catalina.util.LifecycleBase setStateInternal
So where is problem?