Skip to content

Commit

Permalink
add db con pool
Browse files Browse the repository at this point in the history
Signed-off-by: Ismael Ibuan <[email protected]>
  • Loading branch information
iibuan committed Oct 30, 2024
1 parent 8bebd04 commit fea777f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/goapp/infrastructure/database/database.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ func NewDatabase(config config.ConfigManager) Database {
return Database{db: nil}
}

conn.SetMaxOpenConns(10)
conn.SetMaxIdleConns(10)
conn.SetConnMaxLifetime(5 * time.Minute)
conn.SetMaxOpenConns(15)
conn.SetMaxIdleConns(15)
conn.SetConnMaxLifetime(10 * time.Minute)

err = conn.Ping()
if err != nil {
Expand Down

0 comments on commit fea777f

Please sign in to comment.