tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sam Hokin <>
Subject Re: very slow class loading on initial JSP/servlet request after restart
Date Wed, 25 Feb 2009 18:48:09 GMT
André Warnier wrote:
> Sam, because there is quite a bit of traffic on this issue, and because 
> the exact description seems to change a bit over time (e.g. 
> compilation-only or not), could you remake a summary of what you are 
> sure of so far ?

1. Initial requests to ANY JSP page on a site, precompiled or not, or a compiled servlet,
take an inordinate amount of 
time to generate a response, often several minutes, as long as 20 minutes or so after the
server is restarted.

2. After a response is finally generated from a given JSP, that JSP always responds quickly
to subsequent requests.

3. The four virtual hosts start serving pages at the same time, after a Tomcat restart, as
long as 20 minutes after 
Tomcat started up.

4. jstack showed that the delay during a small JSP request was during a call to
 It is still not 
known what the particular file was.

5. strace reveals that thousands and thousands of stat64, access and lstat64 calls are made
to JAR files and classes 
during the initial "stall phase."  I've posted a couple short examples from my test6.jar requests.

> Without totally excluding it for instance, I would surmise that it is 
> unlikely to be a disk-related problem, because copying the complete 
> webapp somewhere else does not change the issue.

Yes, and I have done so several times.

> About the File.exists() issue and what it is checking, isn't a tool like 
> "lsof" a possible way to find out ? It can show all I/O like resources 
> used by a given process, be they sockets or files.

I'm looking at lsof now.  Haven't seen anything remarkable so far, but I'll keep at it a bit.

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

View raw message