fix: db MaxOpenConns setting (#7360)

* Fix pg MaxOpenConns setting

* fix: crdb open conns

---------

Co-authored-by: Livio Spring <livio.a@gmail.com>
This commit is contained in:
Filip Sandborg 2024-02-09 13:43:01 +01:00 committed by GitHub
parent a065ddc706
commit f0ba2b955a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

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

View File

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