serrislew opened a new pull request, #13480:
URL: https://github.com/apache/trafficserver/pull/13480

   `ConnectionTracker::Group` kept its connection count in two mutually 
exclusive places: `TxnState::reserve()` returned the metric gauge *instead of* 
incrementing `Group::_count` when `metric_enabled` is set, and never touched 
`_count` at all. `release()` had the same split.
     
   This was internally consistent — every read inside the tracker also branched 
on `_count_metric != nullptr`, so connection-max enforcement and the 
JSON/`dump` output all saw the right number. But `_count` has one consumer 
*outside* the tracker, in `ServerSessionPool::eventHandler()`: 
https://github.com/apache/trafficserver/blob/master/src/proxy/http/HttpSessionManager.cc#L316
     
     ```cpp
     bool connection_count_below_min = s->conn_track_group->_count <= 
s->conn_track_group->_min_keep_alive_conns;
     ```
   With `proxy.config.http.per_server.connection.metric_enabled` non-zero, 
_count stays at 0, so this is always true and an idle keep-alive session is 
never closed on inactivity timeout — per_server.connection.min is effectively 
unbounded and idle origin connections accumulate.
   
   Scope: the keep-alive minimum is the only affected behavior. Connection-max 
enforcement, blocking, and the exported metric values are unchanged.
   
   Introduced from #12250 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to