Dear Apache Tomcat Support Team,

I hope this message finds you well.

I am writing to inquire whether Apache Tomcat (tomacat version is 10.1.33 
running on Java 21)  exposes virtual thread metrics through JMX / MBeans. 
Specifically:

Virtual Thread Visibility:

Does Tomcat provide MBeans (e.g., under Catalina:type=Executor) to monitor 
virtual thread usage, such as active virtual thread counts, creation rate, or 
parking states?
If not, are there plans to add such metrics in future releases?
Or any alternate ways with which we can monitor this from tomcat side.?

Configuration Clarification:
We have configured Tomcat 10.1.33 with,
<Executor name="tomcatThreadPool" 
className="org.apache.catalina.core.StandardVirtualThreadExecutor"/>
<Connector port="8080" protocol="org.apache.coyote.http11.Http11Nio2Protocol" 
connectionTimeout="18000" socket.soTimeout="18000" redirectPort="8443" 
enableLookups="false" URIEncoding="UTF-8" compression="on" 
useVirtualThreads="true" server="ARandomServer"/>
While this works, the existing ThreadPool MBeans show currentThreadsBusy=-1 and 
maxThreads=200 (incorrect in case of virtual threads). Is this expected 
behavior?

JVM vs. Tomcat Metrics:
We observe that the JVM’s java.lang.management.ThreadMXBean includes virtual 
threads, but this aggregates data across all applications on the JVM. Does 
Tomcat offer a way to isolate virtual thread metrics specific to Tomcat?

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

Reply via email to