Jon,

On 12/21/21 04:55, Jonathan Yom-Tov wrote:
When I look at the source (and docs) I can see that the
StandardThreadExecutor, which is the default, has a max idle time of 60
seconds, after which the threads should be reaped. I can see in our
monitoring that for most Tomcats the thread count for the TLS connector
pool does decrease sometimes. So I wonder what could be causing the
executor to decide not to decrease the count in this specific instance?

Oh, perhaps that has changed over the years. I'm sorry if I was wrong.

Using a manually-configured executor should, of course, give you better control over everything as the <Connector> attributes don't fully-cover what you can configure for an explicitly-configured executor.

Thanks,
-chris

On Mon, Dec 20, 2021 at 9:47 PM Christopher Schultz <
ch...@christopherschultz.net> wrote:

Jon,

On 12/19/21 12:19, Jonathan Yom-Tov wrote:
hi Chris,

Sorry for the late reply, I didn't see your reply for some reason. Here's
the relevant connector configuration:

   <Connector port="10430" URIEncoding="UTF-8" protocol="HTTP/1.1"
connectionTimeout="20000" redirectPort="8443" maxHttpHeaderSize="8192"
scheme="https" secure="true" proxyPort="443"  relaxedQueryChars=" { }
" />
<Connector port="1043"  URIEncoding="UTF-8" protocol="HTTP/1.1"
relaxedQueryChars=" { } "
                 connectionTimeout="20000"

redirectPort="8443" maxHttpHeaderSize="8192" />

You are allowing Tomcat to automatically-configure an "Executor" for
you, and that executor will never shed threads.

You need to change your configuration so that you have this:

<Service ...>

    <Executor name="name-of-executor"
      ...
      />

    <Connector port="10430"
      executor="name-of-executor"
      ... />

    <Connector port="1043"
      executor="name-of-executor"
      ... />

You can read more about the configuration of executors here:
https://tomcat.apache.org/tomcat-9.0-doc/config/executor.html

Note that your current configuration has separate thread-pools, one for
each <Connector>. If you specify the "executor" configuration attribute,
you can choose to share a single <Executor> or have separate ones for
each <Connector>. If you want them separate, just define two of them and
reference them appropriately.

Hope that helps,
-chris

On Tue, Dec 7, 2021 at 10:28 PM Christopher Schultz <
ch...@christopherschultz.net> wrote:

Jon,

On 12/6/21 10:28, Jonathan Yom-Tov wrote:
I have a single instance of Tomcat (version 9.0.54) in which the thread
count on a connector thread pool doesn't reduce despite most of the
threads
(198/200) being idle. If I understand correctly the default idle time
before a thread is reaped is 60 seconds, but this situation persists
for
hours. Any ideas for why this could happen?

Maybe. Can you post your configuration?

-chris

---------------------------------------------------------------------
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

Reply via email to