You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a proposal to add MaxIdleConnections to DBStats.
Currently, DBStats exports the following metrics:
type DBStats struct {
MaxOpenConnections int // Maximum number of open connections to the database.
// Pool Status
OpenConnections int // The number of established connections both in use and idle.
InUse int // The number of connections currently in use.
Idle int // The number of idle connections.
// Counters
WaitCount int64 // The total number of connections waited for.
WaitDuration time.Duration // The total time blocked waiting for a new connection.
MaxIdleClosed int64 // The total number of connections closed due to SetMaxIdleConns.
MaxIdleTimeClosed int64 // The total number of connections closed due to SetConnMaxIdleTime.
MaxLifetimeClosed int64 // The total number of connections closed due to SetConnMaxLifetime.
}
We had issues where our applications were configured with a MaxOpenConnections != MaxIdleConnections, leading to a lot of connection churning to the DB.
MaxOpenConnections is already available in the stats but MaxIdleConnections is missing, making it hard to track affected applications.
The text was updated successfully, but these errors were encountered:
Change https://go.dev/cl/402334 mentions this issue: database/sql: Add MaxIdleConnections to DBStats
ianlancetaylor
changed the title
proposal: database/sql: Add MaxIdleConnections to DBStats
proposal: database/sql: add MaxIdleConnections to DBStats
Apr 26, 2022
This is a proposal to add MaxIdleConnections to DBStats.
Currently, DBStats exports the following metrics:
We had issues where our applications were configured with a MaxOpenConnections != MaxIdleConnections, leading to a lot of connection churning to the DB.
MaxOpenConnections is already available in the stats but MaxIdleConnections is missing, making it hard to track affected applications.
The text was updated successfully, but these errors were encountered: