Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
    
Have you tried to upgrade to Tomcat 7.0.33? –  banterCZ Nov 29 '12 at 12:22

1 Answer 1

Set tomcat.util.scan.DefaultJarScanner.jarsToSkip property in conf/catalina.properties file and configure jars not to be scanned for TLD files.

See http://wiki.apache.org/tomcat/HowTo/FasterStartUp

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.