limit idle connections
This commit is contained in:
parent
46ae5a502a
commit
71549c0dea
1 changed files with 2 additions and 0 deletions
2
db/db.go
2
db/db.go
|
@ -54,6 +54,8 @@ func (s *SQL) Connect(dsn string) error {
|
||||||
return errors.Err(err)
|
return errors.Err(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
s.conn.SetMaxIdleConns(12)
|
||||||
|
|
||||||
return errors.Err(s.conn.Ping())
|
return errors.Err(s.conn.Ping())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue