-
Notifications
You must be signed in to change notification settings - Fork 83
Conversation
@@ -130,6 +137,10 @@ func (db *Database) OpenWithCacher(ctx context.Context, cacher cache.Cacher) err | |||
return fmt.Errorf("database gorm.Open: %w", err) | |||
} | |||
|
|||
if c.MaxConnectionIdleTime > 0 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't done as much research here, but wouldn't SetConnMaxLifetime
work better (and avoid all this overhead)?
db.DB().SetConnMaxLifetime(1*time.Minute)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
made that the default - we can start there and see if it helps
just idle closes at first |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mikehelmick, sethvargo The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Proposed Changes
Release Note