increase max idle conns

we're routinely doing transactions which will hold up connections for some
time, it was pretty easy to run out of 30 conns from routine function
invocations. the 'right' thing is probably to add a config val to the url that
we can strip before passing into the db, but i'm not sure i want to have our
own query params in db urls, either.
This commit is contained in:
Reed Allman
2017-07-14 04:18:50 -07:00
parent db35a8cfd2
commit cb3464fcb1

View File

@@ -119,7 +119,7 @@ func New(url *url.URL) (models.Datastore, error) {
return nil, err return nil, err
} }
maxIdleConns := 30 // c.MaxIdleConnections maxIdleConns := 256 // TODO we need to strip this out of the URL probably
db.SetMaxIdleConns(maxIdleConns) db.SetMaxIdleConns(maxIdleConns)
logrus.WithFields(logrus.Fields{"max_idle_connections": maxIdleConns, "datastore": driver}).Info("datastore dialed") logrus.WithFields(logrus.Fields{"max_idle_connections": maxIdleConns, "datastore": driver}).Info("datastore dialed")