Skip to content

Commit

Permalink
Adds a minimum of one connection to Postgres pool
Browse files Browse the repository at this point in the history
  • Loading branch information
cuducos committed Nov 3, 2024
1 parent 357465d commit 3865a64
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions db/postgres.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ func NewPostgreSQL(uri, schema string, nr *newrelic.Application) (PostgreSQL, er
return PostgreSQL{}, fmt.Errorf("could not create database config: %w", err)
}
cfg.MaxConns = 128
cfg.MinConns = 1
cfg.MaxConnIdleTime = 5 * time.Minute
cfg.MaxConnLifetime = 30 * time.Minute
if nr != nil {
Expand Down

0 comments on commit 3865a64

Please sign in to comment.