Skip to content

Commit

Permalink
Configuring the database connections
Browse files Browse the repository at this point in the history
  • Loading branch information
claudiosegala authored and eabili0 committed Oct 7, 2019
1 parent fb80bff commit 7764021
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions web/config/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,5 +178,9 @@ func (b *WebBuilder) initDB() *gorm.DB {
dbc, err := gorm.Open("mysql", dbURL)
gohtypes.PanicIfError("Unable to open db", http.StatusInternalServerError, err)

dbc.DB().SetMaxIdleConns(4)
dbc.DB().SetMaxOpenConns(20)

return dbc.LogMode(true)

}

0 comments on commit 7764021

Please sign in to comment.