mirror of
https://github.com/netbirdio/netbird.git
synced 2026-04-17 15:56:39 +00:00
set idle conns
This commit is contained in:
@@ -86,6 +86,8 @@ func NewSqlStore(ctx context.Context, db *gorm.DB, storeEngine Engine, metrics t
|
||||
}
|
||||
|
||||
sql.SetMaxOpenConns(100)
|
||||
sql.SetMaxIdleConns(20)
|
||||
sql.SetConnMaxIdleTime(5 * time.Minute)
|
||||
|
||||
log.WithContext(ctx).Infof("Set max open db connections to %d", conns)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user