Bug 56869

Summary: Add code to collect the maximum number of backend connections
Product: Tomcat Connectors Reporter: Martin Knoblauch <knobi>
Component: mod_jkAssignee: Tomcat Developers Mailing List <dev>
Status: RESOLVED FIXED    
Severity: enhancement    
Priority: P2    
Version: 1.2.40   
Target Milestone: ---   
Hardware: All   
OS: All   
Attachments: Patch to add MxCon

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.

Thanks
Martin
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.

Regards,

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