tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sam Hokin <...@ims.net>
Subject Re: very slow class loading on initial JSP/servlet request after restart
Date Tue, 24 Feb 2009 18:54:09 GMT
Mark Thomas wrote:
> Sam Hokin wrote:
>> Thanks, Chris.  I ran e2fsck with the -c option, which runs badblocks,
>> when I tested it earlier.  And I just ran badblocks again - 0 bad blocks
>> found.  I wish I could fix this by simply as swapping out a bad disk
>> (notwithstanding Andre's desire for intellectual pursuits), but I really
>> think it's software, either in some service mucking up the JVM or the
>> JVM itself.  But it only manifests itself under Tomcat, and then only
>> when this particular package is imported.
> 
> Do you see the same issue if you pre-compile that JSP?

Surprisingly, yes.  So it's not only a compilation issue.  After some individual tests, I
compiled the JSPs from the 
four sites I have running on this server and restarted Tomcat, and the LONG delay before Tomcat
begins serving page 
requests continues.  I looked at my individual test JSP, now precompiled, and, sure enough,
it takes a long time to 
respond to the first request after a Tomcat restart.  In fact, it wasn't any better than when
Tomcat compiles them on 
the fly.  So I'm back to thinking the classloader is involved in this delay as well.

I did check, just to be sure, and Tomcat did not write any class files under Catalina/work.
 And if I deleted a compiled 
class file on a site, a request throws an error logged in catalina.out.  So, Tomcat is definitely
using the compiled 
classes.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message