diff --git a/internal/database/cockroach/crdb.go b/internal/database/cockroach/crdb.go index 487db73e47..47fd7b3fce 100644 --- a/internal/database/cockroach/crdb.go +++ b/internal/database/cockroach/crdb.go @@ -79,7 +79,7 @@ func (c *Config) Connect(useAdmin bool, pusherRatio, spoolerRatio float64, purpo return nil, err } - client.SetMaxOpenConns(int(connConfig.MaxIdleConns)) + client.SetMaxOpenConns(int(connConfig.MaxOpenConns)) client.SetMaxIdleConns(int(connConfig.MaxIdleConns)) client.SetConnMaxLifetime(c.MaxConnLifetime) client.SetConnMaxIdleTime(c.MaxConnIdleTime) diff --git a/internal/database/postgres/pg.go b/internal/database/postgres/pg.go index 008f399ea1..6bf1bbd203 100644 --- a/internal/database/postgres/pg.go +++ b/internal/database/postgres/pg.go @@ -80,7 +80,7 @@ func (c *Config) Connect(useAdmin bool, pusherRatio, spoolerRatio float64, purpo return nil, err } - client.SetMaxOpenConns(int(connConfig.MaxIdleConns)) + client.SetMaxOpenConns(int(connConfig.MaxOpenConns)) client.SetMaxIdleConns(int(connConfig.MaxIdleConns)) client.SetConnMaxLifetime(c.MaxConnLifetime) client.SetConnMaxIdleTime(c.MaxConnIdleTime)