Skip to content

Commit

Permalink
feature #229: set the max connection idle time to 0 so that the conne…
Browse files Browse the repository at this point in the history
…ctions are not closed due to a connection's idle time
  • Loading branch information
IshikaGopie committed Jun 12, 2023
1 parent b0baee3 commit 7a8ce4c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions controllers/rest/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -653,6 +653,7 @@ func (p *RESTAPI) SQLConnectionFromConfig(config *model.DBConfig) (*sql.DB, *gor

db.SetMaxOpenConns(config.MaxOpen)
db.SetMaxIdleConns(config.MaxIdle)
db.SetConnMaxIdleTime(0)

//setup gorm
var gormDB *gorm.DB
Expand Down

0 comments on commit 7a8ce4c

Please sign in to comment.