Joan,
On 2/2/26 8:54 AM, Mark Thomas wrote:
On 02/02/2026 10:16, [email protected] wrote:
Hello,
I'm working with Tomcat 10.1.4x and java25, our application is
extensively
using virtual threads. I enable them in tomcat by simply using
'useVirtualThreds: true'.
It's working perfectly, by I was wondering if parameters like maxThreads,
minSpareThreads, acceptCount, etc has any effect when working with
virtual
threads.
For instance, I set maxThreads = minSpareThreads = acceptCount = 1, and
nothing seems to change (for worse).
maxThreads - no effect
minSpareThreads - no effect
In short, anything that you can set on an Executor will have no effect.
acceptCount will have an effect (if your OS pays any attention to the
setting - not all do).
Note that this setting has nothing to do with threads. Instead, it's a
hint to the OS's network stack to allow connections to pile-up in a queue.
The setting likely to have the most impact in this area will be
maxConnections. If set, once you hit maxConnections then acceptCount
comes into play.
Another setting that has nothing to do with threads. The <Connector>
contains settings that affect the <Executor> that gets auto-created if
you use a <Connector> without specifying one, and other settings that
are unrelated.
If you separate your <Connector> into <Connector> and <Executor> it may
become easier for you reason about what will and will not affect your
virtual-threads-based JVM.
-chris
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]