tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeffrey Janner <Jeffrey.Jan...@PolyDyne.com>
Subject RE: how to monitor the traffic through the connector
Date Mon, 01 Apr 2013 19:52:08 GMT
> -----Original Message-----
> From: Daniel Mikusa [mailto:dmikusa@vmware.com]
> Sent: Monday, April 01, 2013 1:09 PM
> To: Tomcat Users List
> Subject: Re: how to monitor the traffic through the connector
> 
> On Apr 1, 2013, at 1:40 PM, a wrote:
> 
> > 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
> >
> 
> First, don't top post (i.e. reply at the top of your email).  Either
> reply below the previous response or as typically works best, inline.
> 
> Second, when you encounter a problem with your servlet / Tomcat, take
> three or four thread dump, separated by 15 - 20 seconds each.  Each
> thread dump will show you the current status of all the threads in the
> JVM.  You can use the thread dumps to check for block threads and long
> running processes.
> 
> Instructions for taking a thread dump.
> 
> 
> https://wiki.apache.org/tomcat/HowTo#How_do_I_obtain_a_thread_dump_of_m
> y_running_webapp_.3F
> 
> Dan
> 

FWIW, I've found jconsole immensely helpful in sorting out blocked threads. And none of that
manually searching through dumps.
Jeff

> 
> >
> >
> > "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



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


Mime
View raw message