You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Christopher Schultz <ch...@christopherschultz.net> on 2018/04/04 13:29:58 UTC

Manager connector status

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

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

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?

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?

Thanks,
- -chris
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlrE01YACgkQHPApP6U8
pFhlGBAAoYr3VzqHYR/KAi36bnOzEtB203QEakMw6qu9dg+dh3auSg/4dA2O1jB6
vgzdg6VbskN4Wq1csV2Ji3byl2DA9UkRhdniscFMKXKESOkNyRRDMWu4gqgSPxt5
qSDsDgoiAnj/YirXQfdXYTHhCIUTxtb+1LTfnEatFa2WylimSglEFGtVk1Du+n2q
FQP+5R7tEuuweeb8ROcB8gE8P9tsGvn9Nn+i0JgW36uG8Zibv5oRR0jSoPcJmZR4
TyK36jCk3M16ln4cfaZX4eQ/qkCUWG/0kVXYNPXKs+9m1TmkfVApJT48m0S33O29
g1FBPUKon4ZE9K0hGQDBLb3z7QL5ljhpKxG5PQnmNZG9eCQI/a6fRQ6PYv5cGwv/
HulxTn/Cl2N/xqSr7RuLrpGkiplJw9VFhOW0Q0uBoDYk4GASON2j6Z6DnYZcWsOo
gTM8yZlX5/pgRae7R9LBIaxe+E9DynHXwKeJ0VTElahWoKFOpX1xr2JxTHlwLz1m
Fn8xZbLZ1gnHrHCpJbBVQie8UxmDN9UIs2/zubvGvr0rMScAFuyFvZNt7Ml5TvUI
z5OhYEJlJWWLN2Bst1mqg3IY3yQ5tiJdKJi81E1YSq1ltNHdFd/56QtLF8k+Cphc
PKIHtrPKQsssn11B1JAG4slH6/z8i9MSbqXBq39ujq5/cEvEi6Q=
=G30n
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Manager connector status

Posted by Christopher Schultz <ch...@christopherschultz.net>.
Mark,

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-127.0.0.1-8217
>>>>
>>>> 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: 
>>> https://bz.apache.org/bugzilla/show_bug.cgi?id=60319
>>
>>> 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.

-chris

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Manager connector status

Posted by Mark Thomas <ma...@apache.org>.
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-127.0.0.1-8217
>>>
>>> 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.

> 
>>> 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: 
>> https://bz.apache.org/bugzilla/show_bug.cgi?id=60319
> 
>> 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'.

Mark

> I see this as a minor bug since you can't see the "max threads" for a
> Connector when an Executor is in play.
> 
> -chris
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Manager connector status

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

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-127.0.0.1-8217
>> 
>> 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?

>> 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: 
> https://bz.apache.org/bugzilla/show_bug.cgi?id=60319
> 
> 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?

I see this as a minor bug since you can't see the "max threads" for a
Connector when an Executor is in play.

- -chris
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAlrFC+4ACgkQHPApP6U8
pFi1rg//VecfQAkDqyIEMcBsbNm/F4vqnTrJ5HYj80yGI4mEtuFmA9Nz9VaVqUHa
ZKFYRd8NS1+cphLQNBrfkEQTcd+K4JYkhGgCpSapR04nXhKVc7pUiWk+C/qWbdCV
r3IrJM3EY+3IUHzQDLzige6dMpTFT4lsNKQGPSaOEFaeuHzO2wL2is067fGVf8qN
MZ2c3HKhac4TRC6Ytg4lOF+hNhhYsnVIOA5LpVtZ7rBcVBl3HPCI/Qm2VC5L5LrO
RbuRje6qCbtFtiTM0Zd9eKxPuc8ObS6NhHLeC0HJkOiCCkq361DZDBzXaMpSzqHN
nr5S9sviozbh8QfCN0IgxqYpdB6hHpUtYrxSOOTi0TUvcJEgoD0Ne5daDGSrHp2O
/ZgFCAxWRRLBsccVaeRXyCcZ8zVF47eXfIH5I52ACNh0LOHJu6rC3jlZnfa43TOO
qjobAjFlSQi6AHAc4xFK/AFvEl65rDHTBQgY3fi53SFAFOH65K7bH6fvCBRMvkuu
MYKG161ukl5GvoWWTIWMhfuQCw+elC4eYPLqclpBkwlwnaDymOwDf5uAcEHTdr/d
XjQ+6yau6G+KFV/64haRYNjB+RtGz8U+CPG6XJkpqXen2ywq/XvgA/5zLQyjNMjT
SAQCEnpn69bXUOkjRru9Q8cYiN+QlGFl6X22I7Cvx50fwOekblg=
=qni4
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Manager connector status

Posted by Mark Thomas <ma...@apache.org>.
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-127.0.0.1-8217
> 
> 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.

> 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:
https://bz.apache.org/bugzilla/show_bug.cgi?id=60319

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.

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org