Bug 56869 - Add code to collect the maximum number of backend connections
Summary: Add code to collect the maximum number of backend connections
Alias: None
Product: Tomcat Connectors
Classification: Unclassified
Component: mod_jk (show other bugs)
Version: 1.2.40
Hardware: All All
: P2 enhancement (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
Depends on:
Reported: 2014-08-19 10:58 UTC by Martin Knoblauch
Modified: 2015-01-06 11:31 UTC (History)
0 users

Patch to add MxCon (6.42 KB, patch)
2014-08-19 10:58 UTC, Martin Knoblauch
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Knoblauch 2014-08-19 10:58:38 UTC
Created attachment 31929 [details]
Patch to add MxCon

In addition to display the "Current number of backend connections" on the jkmanager status page, it is useful to see the "Maximum number of backend connections" as well.

The attached patch against r1618835 does that. It requires an additional "int" field in structure "jk_shm_ajp_worker". As I am not familiar enough with the code, it may as well need adaption of the value of JK_SHM_SLOT_SIZE. This should be checked by someone in the know.

Comment 1 Martin Knoblauch 2014-08-26 13:04:09 UTC
One thought: if this metric is deemed useful, the question is whether it should be reset to zero whenever the worker is reset via the gui. The current patch does not do it. Personally I have no real preference. both ways seem to make sense.
Comment 2 Rainer Jung 2014-12-21 15:08:42 UTC
Thanks for your contribution.

I have applied this patch with very minor changes in r1647150, it will be part of mod_jk 1.2.41.

A change to JK_SHM_SLOT_SIZE was not needed, there was still enough space left. I have added general checking code whether JK_SHM_SLOT_SIZE is big enough
to the startup. Determining the optimal JK_SHM_SLOT_SIZE during configure would be better, but we do not use configure on all platforms.


Comment 3 Rainer Jung 2015-01-06 11:31:17 UTC
I added a reset of the max connected count to the status worker in the general statistics reset functions. See r1649784.