mirror of
https://github.com/Icinga/icingadb.git
synced 2026-05-28 04:35:54 -04:00
Increase timeout to 60s for database connections
This commit is contained in:
parent
6cd2c20e22
commit
a35eaefae9
1 changed files with 1 additions and 1 deletions
|
|
@ -24,7 +24,7 @@ type Database struct {
|
|||
// calls sqlx.Open, but returns *icingadb.DB.
|
||||
func (d *Database) Open(logger *zap.SugaredLogger) (*icingadb.DB, error) {
|
||||
dsn := fmt.Sprintf(
|
||||
"%s:%s@tcp(%s:%d)/%s",
|
||||
"%s:%s@tcp(%s:%d)/%s?timeout=60s",
|
||||
d.User, d.Password, d.Host, d.Port, d.Database)
|
||||
|
||||
db, err := sqlx.Open("mysql", dsn)
|
||||
|
|
|
|||
Loading…
Reference in a new issue