From cb3464fcb1c56a5543d49af78f1f454b50bfd7c0 Mon Sep 17 00:00:00 2001 From: Reed Allman Date: Fri, 14 Jul 2017 04:18:50 -0700 Subject: [PATCH] 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. --- api/datastore/sql/sql.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/datastore/sql/sql.go b/api/datastore/sql/sql.go index b7fb6f274..8e6a9079f 100644 --- a/api/datastore/sql/sql.go +++ b/api/datastore/sql/sql.go @@ -119,7 +119,7 @@ func New(url *url.URL) (models.Datastore, error) { return nil, err } - maxIdleConns := 30 // c.MaxIdleConnections + maxIdleConns := 256 // TODO we need to strip this out of the URL probably db.SetMaxIdleConns(maxIdleConns) logrus.WithFields(logrus.Fields{"max_idle_connections": maxIdleConns, "datastore": driver}).Info("datastore dialed")