tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "a" <leung1_2...@yahoo.com>
Subject Re: how to monitor the traffic through the connector
Date Mon, 01 Apr 2013 17:40:47 GMT
Hi,

Thank you for reply.
The servlet of the web application does not response to the request after 
running serveral months. The problem can be solved by restarting the tomcat. 
I want to troubleshoot by monitoring the number of avaliable threads or 
occupied threads.

Thank you



"Daniel Mikusa" <dmikusa@vmware.com> wrote in message 
news:23DE8F95-CA84-4956-9FDB-2987F1AAA19B@vmware.com...
On Mar 26, 2013, at 6:32 PM, a wrote:

> Hi,
>
> I have defined a connector for port80. For example,
>    <Connector port="80"
>               maxThreads="150"
>               minSpareThreads="25"
>               maxSpareThreads="75"
>               enableLookups="false"
>               acceptCount="100"
>               debug="0"
>               connectionTimeout="2000"
>               disableUploadTimeout="true"
>               compression="on"
>               address="192.168.223.5"/>
>
> Is there any way to monitor the statistics that get throught the port?

No idea what you mean by this.  Can you elaborate?

> I need to log when the requst is fail,

Do you have an access log valve setup?  That will log the HTTP status code. 
You can grep for 500 to get the errors.

  https://tomcat.apache.org/tomcat-7.0-doc/config/valve.html#Access_Log_Valve

> and I need to know the number of
> threads is consumed when the request is fail.

The access log valve can tell you the thread name of the thread that handled 
your request with the "%I" option.  I'm not sure there's an easy way to get 
the total threads in use at the time a request fails though.  What is your 
rationale for needing this information?

Dan


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




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


Mime
View raw message