-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Ronald,

On 2/8/19 15:39, Roskens, Ronald wrote:
> 
> 
>> -----Original Message----- From:
>> john.e.gr...@wellsfargo.com.INVALID 
>> [mailto:john.e.gr...@wellsfargo.com.INVALID] Sent: Friday,
>> February 08, 2019 2:24 PM To: users@tomcat.apache.org Subject:
>> [[EXTERNAL]] RE: Does Tomcat count incoming connections?
>> 
>> Chris,
>> 
>> 
>>> -----Original Message----- From: Christopher Schultz
>>> <ch...@christopherschultz.net> Sent: Friday, February 08, 2019
>>> 11:48 AM To: users@tomcat.apache.org Subject: Re: Does Tomcat
>>> count incoming connections?
>>> 
>>> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256
>>> 
>>> John,
>>> 
>>> 
>>> You can get this count from the Connector via JMX.
>>> 
>>> Look at the tree under
>>> /Catalina/GlobalRequestProcessor/[connector] and there is a
>>> "requestCount" attribute that can be queried.
>>> 
>>> Looks like it's an int value, so it can overflow.
>>> 
>>> - -chris
>> 
>> Thanks but the requestCount really does appear to be requests and
>> not connections.  I have keepAliveTimeout and
>> maxKeepAliveRequests at their defaults (unlimited timeout and 100
>> requests) and I see the count go up with each request, even
>> though my client reports that the connection is getting reused.
>> 
>> I'm asking because I need some hard data on whether clients are
>> reusing their connections for performance reasons.
> 
> How about the Catalina Threadpool ?
> 
> It has busyThreads, active connections, poller threads, and
> keep-alive threads metrics.

Hmm.

My initial thought was that the thread pool would be unaware of the
incoming connections because typically the thread pool is only used to
dispatch a request to a request processing thread (in the standard
servlet blocking-I/O model). Things obviously get more complicated
with the asynchronous dispatch model and Websocket.

But there is in fact a connectionCount property of the "ThreadPool"
MBean, which is really exposing the information being kept by an
instance of the AbstractEndpoint class.

If you look at the connection-state management, you'll see that this
value will go up and down as connections are made and broken rather
than being a count of total connections ever made. If this is what you
are looking for, then I think you can go ahead and use it. If you want
a total-count of all time, it looks like adding it to the
AbstractEndpoint is the way to go.

- -chris
-----BEGIN PGP SIGNATURE-----
Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlxgNZsACgkQHPApP6U8
pFip2xAAjjpdmM2slIG/IpsZVfDc75dY1mRHQIHdNOUxSUftclY7wzqEjw9qjTCN
X/lfW0cvUQ+r0MpnuP93Y13xg0scgV5CEnscKFT94XFfwhba6ilMJcNOGVk28Nr+
YFQ+iHR3VOB4rzsdjSWpIk9PyrwJA3f4+mM3KjZaR0PKrzcEbJulPiUYG7Yfv+Vf
KQ8tO4PeI8T644FcV1cNECUmqORX8xN26HKMM2k/jqqHdv934PAKk6qsmiS367VL
KDokbEREzMk8J3aph6dhiszDbIm69dQkvlcEbVZ/tSrwS6pQE2HYlat5fA/RCYzM
U72U/+7ybVcC/9DlDegdj50k82JNBIBFPSioBeEFlw5QpDSnFpQe91Aig88CO7vE
GkLWlWcFj50Z1tbLSKL1mcGG+q6w//ubJa6bqrhf10n7SDwqI1XutA7LksSuFTVk
6gXwmiWD4XKRuNRHhs6SFyhVKBa9xEWuq8iYcYEnFZi4xHRUR3TWc4E9/34koGWy
ovzCBcp08ZYa9xUq993U+/2IYbnomVtI3O0N38eKFZFPmpFRphJTkFllamUQLzDB
4mc8GQTVJEQKOKnKlx3y+EVHX6O4INbU2YNzM3/XAveP4vW6qluFSicriL4zyvcj
MgLJwSf+HVIpymyohcxqTFyBaB9vEZrWG8nskdDwN66cnlnu0Pw=
=fC92
-----END PGP SIGNATURE-----

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

Reply via email to