Re: Tracking keep alive connections
> 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. -- Daniel Andrés Pelaez López - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tracking keep alive connections
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
Tomcat 9 build from scratch
Hello, We build our own Tomcat 9 binaries from scratch (grab the tag from https://github.com/apache/tomcat) and call ant (with java8) to build it. Starting with 9.0.83, our pipelines are failing with the error build.xml:113: Java version 17 or newer is required (1.8.0_381 is installed) The apps we have are only certified on Java 8 and it would take a bit of work to get it to Java 17. My question is if I build the binaries with Java 17, can I still use it with Java 8? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat 9 build from scratch
Yes, JDK17 can produce JDK8 bytecode, in fact that's what Tomcat does. On Thu, Nov 30, 2023 at 2:35 PM Aditya Shastri wrote: > Hello, > > We build our own Tomcat 9 binaries from scratch (grab the tag from > https://github.com/apache/tomcat) and call ant (with java8) to build > it. > > Starting with 9.0.83, our pipelines are failing with the error > build.xml:113: Java version 17 or newer is required (1.8.0_381 is > installed) > > The apps we have are only certified on Java 8 and it would take a bit > of work to get it to Java 17. > > My question is if I build the binaries with Java 17, can I still use > it with Java 8? > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > >
Re: Tomcat 9 build from scratch
Thanks for the response Adwait. My ant skills are lacking. Does the minimum bytecode definition come from this line? What does this line do? On Thu, Nov 30, 2023 at 6:10 PM Adwait Kumar Singh wrote: > > Yes, JDK17 can produce JDK8 bytecode, in fact that's what Tomcat does. > > On Thu, Nov 30, 2023 at 2:35 PM Aditya Shastri > wrote: > > > Hello, > > > > We build our own Tomcat 9 binaries from scratch (grab the tag from > > https://github.com/apache/tomcat) and call ant (with java8) to build > > it. > > > > Starting with 9.0.83, our pipelines are failing with the error > > build.xml:113: Java version 17 or newer is required (1.8.0_381 is > > installed) > > > > The apps we have are only certified on Java 8 and it would take a bit > > of work to get it to Java 17. > > > > My question is if I build the binaries with Java 17, can I still use > > it with Java 8? > > > > - > > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > > For additional commands, e-mail: users-h...@tomcat.apache.org > > > > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tomcat 9 build from scratch
The former. On Thu, Nov 30, 2023 at 3:40 PM Aditya Shastri wrote: > Thanks for the response Adwait. > > My ant skills are lacking. Does the minimum bytecode definition come > from this line? > > > What does this line do? > > > On Thu, Nov 30, 2023 at 6:10 PM Adwait Kumar Singh > wrote: > > > > Yes, JDK17 can produce JDK8 bytecode, in fact that's what Tomcat does. > > > > On Thu, Nov 30, 2023 at 2:35 PM Aditya Shastri < > aditya.shastri5...@gmail.com> > > wrote: > > > > > Hello, > > > > > > We build our own Tomcat 9 binaries from scratch (grab the tag from > > > https://github.com/apache/tomcat) and call ant (with java8) to build > > > it. > > > > > > Starting with 9.0.83, our pipelines are failing with the error > > > build.xml:113: Java version 17 or newer is required (1.8.0_381 is > > > installed) > > > > > > The apps we have are only certified on Java 8 and it would take a bit > > > of work to get it to Java 17. > > > > > > My question is if I build the binaries with Java 17, can I still use > > > it with Java 8? > > > > > > - > > > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > > > For additional commands, e-mail: users-h...@tomcat.apache.org > > > > > > > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > >
Re: Tomcat 9 build from scratch
Sounds good. Thanks! On Thu, Nov 30, 2023 at 3:40 PM Adwait Kumar Singh wrote: > > The former. > > > > On Thu, Nov 30, 2023 at 3:40 PM Aditya Shastri > wrote: > > > Thanks for the response Adwait. > > > > My ant skills are lacking. Does the minimum bytecode definition come > > from this line? > > > > > > What does this line do? > > > > > > On Thu, Nov 30, 2023 at 6:10 PM Adwait Kumar Singh > > wrote: > > > > > > Yes, JDK17 can produce JDK8 bytecode, in fact that's what Tomcat does. > > > > > > On Thu, Nov 30, 2023 at 2:35 PM Aditya Shastri < > > aditya.shastri5...@gmail.com> > > > wrote: > > > > > > > Hello, > > > > > > > > We build our own Tomcat 9 binaries from scratch (grab the tag from > > > > https://github.com/apache/tomcat) and call ant (with java8) to build > > > > it. > > > > > > > > Starting with 9.0.83, our pipelines are failing with the error > > > > build.xml:113: Java version 17 or newer is required (1.8.0_381 is > > > > installed) > > > > > > > > The apps we have are only certified on Java 8 and it would take a bit > > > > of work to get it to Java 17. > > > > > > > > My question is if I build the binaries with Java 17, can I still use > > > > it with Java 8? > > > > > > > > - > > > > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > > > > For additional commands, e-mail: users-h...@tomcat.apache.org > > > > > > > > > > > > - > > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > > For additional commands, e-mail: users-h...@tomcat.apache.org > > > > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Tracking keep alive connections
Christopher, 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? > That makes totally sense, any way to listen those events in Tomcat? >