Daniel,
On 11/30/23 07:08, Daniel Andres Pelaez Lopez wrote:
What kind of number are you looking for?
I would say something like the time a connection has been open.
Can you please give the JMX path to tomcat_connections_keepalive_current
and tomcat_connections_current? I have no idea what you are talking
about there... is there some tool that provides those "variable names"
to you somewhere?
Those are metrics generated when we activate
server.tomcat.mbeanregistry.enabled=true in Spring Boot
By definition, any connection that is open and not currently-processing
a request is in the "keep-alive" state. Is that what you want to count?
The Manager application has a view of all current connections which
shows their state, including "waiting for next keep-alive request".
Understand, I think the connection time is what I searching for, for
instance, if the average connection time is 1 hour for 50 connections,
with a keep alive timeout of 5 minutes, it means the connection was
receiving requests the whole hour.
So... when a connection is established, save the current timestamp on
the connection. When it closes, take the delta of the
start-of-connection and end-of-connection, and add it to a bounded queue
(say, 100? 1000?) of most-recent-connection-lifetimes. Any time you
request the average from the bean, it does the math on the whole set?
-chris
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org