limit idle connections

This commit is contained in:
Alex Grintsvayg 2019-06-26 11:02:37 -04:00
parent 46ae5a502a
commit 71549c0dea
No known key found for this signature in database
GPG key ID: AEB3F089F86A22B5

View file

@ -54,6 +54,8 @@ func (s *SQL) Connect(dsn string) error {
return errors.Err(err)
}
s.conn.SetMaxIdleConns(12)
return errors.Err(s.conn.Ping())
}