You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Kaouthar Ghorbel <gk...@gmail.com> on 2015/06/19 15:07:48 UTC

detect requests that take a long time to process

hello ,my webapplication is very slow , i want to know how can i detect
requests that take a long time to process in tomcat 8.

thanks

Re: detect requests that take a long time to process

Posted by Kaouthar Ghorbel <gk...@gmail.com>.
Thanks for your answer ..

2015-06-19 14:13 GMT+01:00 Daniel Mikusa <dm...@pivotal.io>:

> On Fri, Jun 19, 2015 at 9:07 AM, Kaouthar Ghorbel <gk...@gmail.com>
> wrote:
>
> > hello ,my webapplication is very slow , i want to know how can i detect
> > requests that take a long time to process in tomcat 8.
> >
>
> 1.) Add "%D" or "%T" to your access log format.  That will log info about
> how long the request took to process.
>
> %D - Time taken to process the request, in millis
> %T - Time taken to process the request, in seconds
>
> http://tomcat.apache.org/tomcat-8.0-doc/config/valve.html#Access_Log_Valve
>
> 2.) This valve can also help.  It'll dump a stack trace when a request
> takes longer than the configure threshold.
>
>
> http://tomcat.apache.org/tomcat-8.0-doc/config/valve.html#Stuck_Thread_Detection_Valve
>
> Dan
>
>
>
> >
> > thanks
> >
>

Re: detect requests that take a long time to process

Posted by Daniel Mikusa <dm...@pivotal.io>.
On Fri, Jun 19, 2015 at 9:07 AM, Kaouthar Ghorbel <gk...@gmail.com>
wrote:

> hello ,my webapplication is very slow , i want to know how can i detect
> requests that take a long time to process in tomcat 8.
>

1.) Add "%D" or "%T" to your access log format.  That will log info about
how long the request took to process.

%D - Time taken to process the request, in millis
%T - Time taken to process the request, in seconds

http://tomcat.apache.org/tomcat-8.0-doc/config/valve.html#Access_Log_Valve

2.) This valve can also help.  It'll dump a stack trace when a request
takes longer than the configure threshold.

http://tomcat.apache.org/tomcat-8.0-doc/config/valve.html#Stuck_Thread_Detection_Valve

Dan



>
> thanks
>