tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <>
Subject Re: Manager connector status
Date Fri, 06 Apr 2018 13:49:40 GMT

On 4/6/18 8:20 AM, Mark Thomas wrote:
> On 04/04/18 18:31, Christopher Schultz wrote:
>> Mark,
>> On 4/4/18 9:52 AM, Mark Thomas wrote:
>>> On 04/04/18 14:29, Christopher Schultz wrote:
>>>> All,
>>>> I'm running 8.5.29 and I'm looking at the manager application, 
>>>> specifically at the Connectors list on the "Server Status" page.
>>>> I have two connectors:
>>>> 1. ajp-nio-8215
>>>> 2. http-nio-
>>>> The server is idle (it's my own desktop) and I loaded the Server 
>>>> Status page over the HTTP connector. However, both connectors say
>>>> that the "Current thread busy" count is "1". Why is the AJP
>>>> connector "using" a thread? It should be doing nothing, right?
>>> I don't see this on a clean install.
>>> I do see this if I configure both the AJP and HTTP connector to use
>>> a shared executor. In this case, the thread stats reported are for
>>> the executor.
>> Right, because none of the Connectors in the default configuration use
>> an Executor.
>> But what about the "1 thread always being used" thing?
> That is the current request that generated the page you are looking at.

I have two connectors. I'm only connecting over a single connector.
Because there is an <Executor>, I know it's only one thread. But the
display makes it look like two threads are being used. Let's say I had
10 connectors and there were 10 in-flight requests. Looking at the
Server Status page, I could easily come to the wrong conclusion that 100
threads were in use.

I think we might want to change that. Even by saying "this connector is
using an executor called <foo> which may be shared with other
connectors" and not changing anything else would be an improvement.

I understand what's happening, and even I was confused by what I saw.

>>>> Another odd thing is that the connector says the "Max Threads" is
>>>> -1. That may be true for the connector itself because I'm using
>>>> an Executor. But the executor does have a thread-limit and that's
>>>> not being shown.
>>>> The current thread count and current thread busy counts are sane 
>>>> values, so those must be coming from the Executor. Why not the
>>>> "max threads" value?
>>> That would need some svn archaeology. From memory there have been
>>> some changes around this area over the years as various edge cases
>>> emerge.
>>> Ah. And there you have the answer: 
>>> Because the Connector and Executor have separate attributes for 
>>> maxThreads, minSpareThreads and threadPriority the getters and
>>> setters were providing inconsistent / misleading values. Returning
>>> -1 was an attempt to indicate that the attribute was not being used
>>> and that you should look elsewhere for the value.
>>> The dynamic stats (current thread-pool size, active threads, etc.)
>>> can be provided in a consistent manner so don;t need this
>>> treatment.
>> That's what I figured, but there is no information about Executors in
>> the manager.
>> Would it be better to introduce more information about Executors in
>> the Manager, or to change the Manager to show the Executor information
>> when one is in use?
> My preference would be for more information and less 'magic'.

Okay. I'll file an enhancement request and see if anyone wants to
volunteer. Seems like an advanced-beginner enhancement to me.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message