Skip to content

Commit

Permalink
sci-server: reduce db max connection lifetime
Browse files Browse the repository at this point in the history
Fixes invalid connection errors according to
go-sql-driver/mysql#674
  • Loading branch information
jechols committed Jul 3, 2018
1 parent c287ead commit d9d6d01
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/sci-server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ func getConf() {
if err != nil {
logger.Fatalf("Error trying to connect to database: %s", err)
}
global.DB.SetConnMaxLifetime(time.Second * 14400)
global.DB.SetConnMaxLifetime(time.Second)

global.Store = sessions.NewCookieStore([]byte(global.Conf.SessionSecret))
}

0 comments on commit d9d6d01

Please sign in to comment.