The get_status_variable() function was only scanning worker threads
but ignoring auxiliary threads (idle threads) where timeout
terminations are detected. This caused the timeout termination
counter to show incorrect/zero values.
- Added idle thread scanning to both overloaded versions of
get_status_variable() function
- Now properly collects metrics from both worker and idle threads
- Fixes the issue where proxysql_mysql_timeout_terminated_connections_total
showed zero despite actual timeout terminations
Resolves the metrics reading issue identified in the previous commits.
proxy_warning("Killing client connection %s:%d because inactive for %llums\n",mysess->client_myds->addr.addr,mysess->client_myds->addr.port,sess_time/1000);
mysess->killed=true;
// Increment counter for timeout-terminated connections
proxy_warning("Killing client connection %s:%d because inactive for %llums\n",sess->client_myds->addr.addr,sess->client_myds->addr.port,sess_time/1000);
}
// Increment counter for timeout-terminated connections
proxy_warning("Killing client connection %s:%d because inactive for %llums\n",sess->client_myds->addr.addr,sess->client_myds->addr.port,sess_time/1000);
// Increment counter for timeout-terminated connections