I use a filter servlet to log entry/exit timestamps for requests along with
some shell scripting to process the logs looking for "still open" requests.
I've been using it for over a year for a production site, it's been very
useful for debugging unexplained slowdowns, hangs, etc.

Filter is pretty simple, essentially:

public void doFilter(...) {
  int request_id = ++s_request_id ;
  long lStart = System.currentTimeMillis() ;
  logger_.info(request_id + " processing request for '" + sRequestedUrl +
"'") ;
  try {
    fc.doFilter(request, response) ;
  }
  finally {
    logger_.info(request_id + " processed in " + (System.currentTimeMillis()
- lStart) + " msec") ;
  }
}


On Tue, Jun 3, 2008 at 10:15 AM, Álvaro Morillas (Sortes Ing. Inf. S. L. ) <
[EMAIL PROTECTED]> wrote:

> Hi everyone. This is my first post in this group. I hope this question
> hasn't been answered before.
>
>
>
> I have a problem with my web application. It is growing and in certain peak
> moments the server gets very busy. I work with Tomcat 5.5 and IIS. I think
> the problem is within my programming (not configuration). Because of that
> I'm trying to see what requests are being processed in a certain moment by
> Tomcat and for how long they've been there so I can tune them.
>
>
>
> Is there any application I can use to see that? Or I have to use the logs
> and analize them in any way?
>
>
>
> I hope there is an easy solution for my problem.
>
>
>
> Thanks in advance.
>
>
>
> --------------------------------------------------------
>
> Álvaro Morillas Correa
>
> Sortes Ingeniería Informática, S.L.
>
> http://www.sortes.com
>
> Pza. Mayor, 25, Of. 9-B - 28911 Leganés (Madrid)
>
> Horario: L-J: 9:00-14:00 15:00-18:30 V: 9:00-15:00
>
> Tfno: 91 694 33 88 Fax: 91 693 10 47
>
> --------------------------------------------------------
>
>
>
>

Reply via email to