You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Dev Zero G Ltd <ma...@devzerog.com> on 2002/08/19 21:30:44 UTC

Strange delays while Tomcat works

Hi, all!

    Introduction: we have Windows 2000 running SUN JDK 1.4.0, Tomcat 
4.0.4 and our software, that uses Struts and taglibs.

While requesting action from browser we have strange delays during whole
request-serving process. In a words, action (servlet) receives a 
request, does some work, sends control to the JSP page, which prepares 
resulting HTML page for browser. This JSP page has a lot of custom tags 
instances (from jakarta-struts project and our own as well). Using debug 
output (an old method - System.out.println(...) ) we realized, that 
tomcat suddenly  "hangs" up for some time - every time in different 
places of source code. Seems like it runs servlet (for less that 1 
second), than makes some kind of preparing of JSP file (i think it's 
enough to compile servlet from it just one time - but not everytime, as 
we have) - for aproximately 5-6 seconds, and processes JSP page. The 
very strange behavior aoccurs right there - custom tags may be
executed for 2,3,6 or even 10 seconds. In other time, after executing 
part of JSP page, debug output stops, and continues after 2-3 seconds.

    On computer we have stopped all background services, it has 1GHz 
Duron CPU and 512M RAM - so I think problem is not in hardware. May be 
some tuning of Tmcat conf files will help - some kind of buffer sizes 
etc. I couldn't find anything helpful not in server.xml, nor in web.xml 
of application.
    I'll repeat, such delays always occurs while procxessing the JSP 
page, almost every time - in different source location. But these delays 
realy slows whole project - so ANY KIND OF HELP AND/OR SUGGESTIONS would 
be taken in consideration with gratitude.

Dev Zero G team
http://devzerog.com


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Strange delays while Tomcat works

Posted by Dev Zero G Ltd <ma...@devzerog.com>.
We will try that, however - the problem seemed to have disappeared when 
the app was ran on Tomcat 4.1.9... Just out of curiosity - any idea why?

Thanks in advance,

Dev Zero G team
http://devzerog.com


Glenn Nielsen wrote:
> This most likely is due to JVM garbage collection.  You may need to tune
> your java startup arguments to tune your memory usage and GC.
> 
> When the JVM does GC the application (Tomcat) freezes until the GC is 
> complete.
> 
> Try starting Tomcat with the java arg "-verbose:gc", this will add
> data about TC to stdout.
> 
> Regards,
> 
> Glenn
> 
> Dev Zero G Ltd wrote:
> 
>> Hi, all!
>>
>>    Introduction: we have Windows 2000 running SUN JDK 1.4.0, Tomcat 
>> 4.0.4 and our software, that uses Struts and taglibs.
>>
>> While requesting action from browser we have strange delays during whole
>> request-serving process. In a words, action (servlet) receives a 
>> request, does some work, sends control to the JSP page, which prepares 
>> resulting HTML page for browser. This JSP page has a lot of custom 
>> tags instances (from jakarta-struts project and our own as well). 
>> Using debug output (an old method - System.out.println(...) ) we 
>> realized, that tomcat suddenly  "hangs" up for some time - every time 
>> in different places of source code. Seems like it runs servlet (for 
>> less that 1 second), than makes some kind of preparing of JSP file (i 
>> think it's enough to compile servlet from it just one time - but not 
>> everytime, as we have) - for aproximately 5-6 seconds, and processes 
>> JSP page. The very strange behavior aoccurs right there - custom tags 
>> may be
>> executed for 2,3,6 or even 10 seconds. In other time, after executing 
>> part of JSP page, debug output stops, and continues after 2-3 seconds.
>>
>>    On computer we have stopped all background services, it has 1GHz 
>> Duron CPU and 512M RAM - so I think problem is not in hardware. May be 
>> some tuning of Tmcat conf files will help - some kind of buffer sizes 
>> etc. I couldn't find anything helpful not in server.xml, nor in 
>> web.xml of application.
>>    I'll repeat, such delays always occurs while procxessing the JSP 
>> page, almost every time - in different source location. But these 
>> delays realy slows whole project - so ANY KIND OF HELP AND/OR 
>> SUGGESTIONS would be taken in consideration with gratitude.
>>
>> Dev Zero G team
>> http://devzerog.com


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Strange delays while Tomcat works

Posted by Glenn Nielsen <gl...@mail.more.net>.
This most likely is due to JVM garbage collection.  You may need to tune
your java startup arguments to tune your memory usage and GC.

When the JVM does GC the application (Tomcat) freezes until the GC is complete.

Try starting Tomcat with the java arg "-verbose:gc", this will add
data about TC to stdout.

Regards,

Glenn

Dev Zero G Ltd wrote:
> Hi, all!
> 
>    Introduction: we have Windows 2000 running SUN JDK 1.4.0, Tomcat 
> 4.0.4 and our software, that uses Struts and taglibs.
> 
> While requesting action from browser we have strange delays during whole
> request-serving process. In a words, action (servlet) receives a 
> request, does some work, sends control to the JSP page, which prepares 
> resulting HTML page for browser. This JSP page has a lot of custom tags 
> instances (from jakarta-struts project and our own as well). Using debug 
> output (an old method - System.out.println(...) ) we realized, that 
> tomcat suddenly  "hangs" up for some time - every time in different 
> places of source code. Seems like it runs servlet (for less that 1 
> second), than makes some kind of preparing of JSP file (i think it's 
> enough to compile servlet from it just one time - but not everytime, as 
> we have) - for aproximately 5-6 seconds, and processes JSP page. The 
> very strange behavior aoccurs right there - custom tags may be
> executed for 2,3,6 or even 10 seconds. In other time, after executing 
> part of JSP page, debug output stops, and continues after 2-3 seconds.
> 
>    On computer we have stopped all background services, it has 1GHz 
> Duron CPU and 512M RAM - so I think problem is not in hardware. May be 
> some tuning of Tmcat conf files will help - some kind of buffer sizes 
> etc. I couldn't find anything helpful not in server.xml, nor in web.xml 
> of application.
>    I'll repeat, such delays always occurs while procxessing the JSP 
> page, almost every time - in different source location. But these delays 
> realy slows whole project - so ANY KIND OF HELP AND/OR SUGGESTIONS would 
> be taken in consideration with gratitude.
> 
> Dev Zero G team
> http://devzerog.com
> 
> 
> -- 
> To unsubscribe, e-mail:   
> <ma...@jakarta.apache.org>
> For additional commands, e-mail: 
> <ma...@jakarta.apache.org>




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Strange delays while Tomcat works

Posted by Dev Zero G Ltd <ma...@devzerog.com>.
Thanks for the suggestion, however:

We are running on a dual Athlon 1900/1GB RAM/2x18Gb 15K RPM SCSI FreeBSD 
system, yet the processor load hits 100% (top).

We have tried running the same on Resin, and DO NOT have the problem... 
It seems to be some internal Tomcat bug. How and what can we test/report 
to diagnose and fix the problem? We WANT to fix the problem ourselves, 
but it would help to know where to dig...

Many thanks in advanvce!

Dev Zero G team


Mladen Turk wrote:
> 
>>-----Original Message-----
>>From: Dev Zero G Ltd [mailto:mailing_lists@devzerog.com] 
>>Sent: Monday, August 19, 2002 9:31 PM
>>To: Tomcat Developers List
>>Subject: Strange delays while Tomcat works
>>
> 
> 
> If your processor load is low during those delays then it seems to me
> that you have a problems like a network name to IP resolvings. Try to
> eliminate all the 'named' resources to IP based.
> 
> 
>>we have) - for aproximately 5-6 seconds, and processes JSP page. The 
>>very strange behavior aoccurs right there - custom tags may 
>>be executed for 2,3,6 or even 10 seconds. In other time, 
>>after executing 
>>part of JSP page, debug output stops, and continues after 2-3 seconds.
>>
> 
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 
> 
> 




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Strange delays while Tomcat works

Posted by Mladen Turk <mt...@mappingsoft.com>.

> -----Original Message-----
> From: Dev Zero G Ltd [mailto:mailing_lists@devzerog.com] 
> Sent: Monday, August 19, 2002 9:31 PM
> To: Tomcat Developers List
> Subject: Strange delays while Tomcat works
> 

If your processor load is low during those delays then it seems to me
that you have a problems like a network name to IP resolvings. Try to
eliminate all the 'named' resources to IP based.

> we have) - for aproximately 5-6 seconds, and processes JSP page. The 
> very strange behavior aoccurs right there - custom tags may 
> be executed for 2,3,6 or even 10 seconds. In other time, 
> after executing 
> part of JSP page, debug output stops, and continues after 2-3 seconds.
> 


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>