[feature request] connection lifetime for backend connection
Author: takaidohigasiCreated Apr 21, 2026Updated Sep 3, 2026
we would like to use connection lifetime config like
https://pkg.go.dev/database/sql#DB.SetConnMaxLifetime
in some our use cases, we use cloud service endpoint as proxysql backend.
mysql_servers=
(
{
address = "db.endpoint.com"
port = 3306
hostgroup = 0
# max_connections: 1000 is the default value
max_connections = 9000
weight = 0
status = "ONLINE"
use_ssl = 0
comment = "cloud service endpoint"
}
)currently when we scale out the number of node for db.endpoint.com, the time that new node is actually used equivalent to the existing node becomes slowly because of basic connection reuse policy. so we want to set temporally shorter variable when we scale out.
I would like to be happy if ProxySQL have some connection lifetime config. do not accept any new request for the backend connection when lifetime has gone, is nice for us.
Source: sysown/proxysql