hi Chris,

Thanks for your reply.

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?




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

-- 
[image: -]
<http://www.sysaid.com/?utm_source=signature&utm_medium=email&utm_campaign=sysaid-logo>
[image:
-]
Jonathan Yom-Tov
Senior Architect
jonathan.yom...@sysaid.com
Phone (IL): +972 (3) 533-3675 Ext. 932
Mobile (IL):  +972549174862
[image: -] <https://www.facebook.com/SysAidIT>   [image: -]
<https://twitter.com/sysaid>   [image: -]
<https://www.linkedin.com/company/sysaid-technologies-ltd>   [image: -]
<https://www.youtube.com/user/SysAidIT>   [image: -]
<https://www.instagram.com/sysaid_technologies/>
[image: Banner] <https://www.sysaid.com/sig-link>

Reply via email to