You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Utkarsh Dave <ut...@gmail.com> on 2015/11/06 18:47:43 UTC

Can we have number of RequestDispatcher (busy) logged in log files !

Hello,
In tomcat 7
I wanted to know if there is a way we can log the number of request
dispatcher threads used/busy/blocked, in log files. Or is there a mechanism
that logs the number of request threads so that user can be warned about
the request dispatcher threads if too many are being in busy state due to
too many sessions or BLOCKED situations.
Situation like this may result in DoS situation and tomcat becomes
unresponsive.

-Regards
Utkarsh

Re: Can we have number of RequestDispatcher (busy) logged in log files !

Posted by Konstantin Kolinko <kn...@gmail.com>.
2015-11-07 0:52 GMT+03:00 Christopher Schultz <ch...@christopherschultz.net>:
> Utkarsh,
>
> On 11/6/15 12:47 PM, Utkarsh Dave wrote:
>> Hello,
>> In tomcat 7
>> I wanted to know if there is a way we can log the number of request
>> dispatcher threads used/busy/blocked, in log files. Or is there a mechanism
>> that logs the number of request threads so that user can be warned about
>> the request dispatcher threads if too many are being in busy state due to
>> too many sessions or BLOCKED situations.
>> Situation like this may result in DoS situation and tomcat becomes
>> unresponsive.
>
> This is a perfect use case for monitoring using JMX:
>
> http://wiki.apache.org/tomcat/FAQ/Monitoring
>
> http://events.linuxfoundation.org/sites/events/files/slides/Monitoring%20Apache%20Tomcat%20with%20JMX.pdf

+1

BTW, for some ideas you may also want to look at
- StuckThreadDetectionValve [1]

It won't help with responsiveness, but it may help to identify weak
spots in your own web application.

- SemaphoreValve [1]

As an example.

- maxActiveSessions attribute of StandardManager [2]

Also you may want to look at the Status page of Tomcat Manager web
application and corresponding source code as an example of working
with JMX.

[1] http://tomcat.apache.org/tomcat-7.0-doc/config/valve.html
[2] http://tomcat.apache.org/tomcat-7.0-doc/config/manager.html

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


Re: Can we have number of RequestDispatcher (busy) logged in log files !

Posted by Christopher Schultz <ch...@christopherschultz.net>.
Utkarsh,

On 11/6/15 12:47 PM, Utkarsh Dave wrote:
> Hello,
> In tomcat 7
> I wanted to know if there is a way we can log the number of request
> dispatcher threads used/busy/blocked, in log files. Or is there a mechanism
> that logs the number of request threads so that user can be warned about
> the request dispatcher threads if too many are being in busy state due to
> too many sessions or BLOCKED situations.
> Situation like this may result in DoS situation and tomcat becomes
> unresponsive.

This is a perfect use case for monitoring using JMX:

http://wiki.apache.org/tomcat/FAQ/Monitoring

http://events.linuxfoundation.org/sites/events/files/slides/Monitoring%20Apache%20Tomcat%20with%20JMX.pdf

-chris

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