Skip to content

Commit

Permalink
Updated config.go to remove the defaulting idle connection limit of 5…
Browse files Browse the repository at this point in the history
… which is an issue for upstream go-sql-driver/mysql#674
  • Loading branch information
Aiden Andrews-McDermott committed Dec 27, 2019
1 parent 789272a commit 98f78db
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions storage/sql/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,13 @@ func (s *MySQL) open(logger log.Logger) (*conn, error) {
return nil, err
}

if s.MaxIdleConns == 0 {
/*Override default behaviour to fix https://github.com/dexidp/dex/issues/1608*/
db.SetMaxIdleConns(0)
} else {
db.SetMaxIdleConns(s.MaxIdleConns)
}

err = db.Ping()
if err != nil {
if mysqlErr, ok := err.(*mysql.MySQLError); ok && mysqlErr.Number == mysqlErrUnknownSysVar {
Expand Down

0 comments on commit 98f78db

Please sign in to comment.