tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <>
Subject Re: How do I get Tomcat 7 to start up faster in Linux CentOS kernel version 2.6.18?
Date Mon, 05 Nov 2012 19:40:12 GMT
Hash: SHA1


On 11/5/12 10:28 AM, Dilshad Shahid wrote:
> We are using Tomcat 7 to load up our application written in
> struts. On production sites, the startup time can be as slow as 20
> minutes. When I was testing on our QA environments, I saw much
> faster times, around 9 to 40 seconds, so there is a disconnect
> there. Our QA environment is not an exact duplicate of our
> production site so there could be variables in there to investigate
> as well.

I think we can all agree that 20 minutes is unreasonable. Given that, I
have two suggestions for possible problems and their solutions:

1. Lack of entropy for randomness. If you are using SSL connectors or
your application uses sessions that are configured to use a SecureRandom
object for session id generation (which might actually be the default
these days), then your Tomcat process will need sufficient entropy to
launch. This is easily identified via a thread dump.

Solutions: use /dev/urandom (not recommended) or something like an
Entropy Key (

2. Long DNS lookup timeouts coupled with huge numbers of URL lookups.
This can happen if you have lots of XML files being parsed and validated
against remote DTDs or Schemas. This is easily identified via a series
of thread dumps (you may be noticing a pattern, here).

Solutions: fix your DNS and/or use something like XML Catalog

> I have forwarded your replies to the manager in charge of the
> project and someone in his team has been looking into it so I don't
> have any feedback just yet.

You could save everyone some time and spend 2 minutes investigating
this yourself: it doesn't take long to launch your app a few times and
then get a thread dump while it's stalled.

- -chris
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools -
Comment: Using GnuPG with Mozilla -


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message