set idle conns

This commit is contained in:
Pascal Fischer
2025-02-24 12:55:18 +01:00
parent 6130a48c44
commit 5b6e93e927

View File

@@ -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)