feat(database): Expose DB connection max idle time configuration#113
Merged
feat(database): Expose DB connection max idle time configuration#113
Conversation
Currently, the database connection pool settings allow for configuring max open connections, max idle connections, and max lifetime, but not the max idle time. Expose the `DB_CONN_MAX_IDLE_TIME_MINUTES` environment variable to provide better control over how long idle connections are kept in the pool before being closed. - Add `DBConnMaxIdleTime` to configuration with a default of 5 minutes - Update `internal/app/di.go` to apply the setting to the database pool - Document the new setting in `docs/configuration.md` - Update `.env.example` with the new variable
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently, the database connection pool settings allow for configuring max open connections, max idle connections, and max lifetime, but not the max idle time.
Expose the
DB_CONN_MAX_IDLE_TIME_MINUTESenvironment variable to provide better control over how long idle connections are kept in the pool before being closed.DBConnMaxIdleTimeto configuration with a default of 5 minutesinternal/app/di.goto apply the setting to the database pooldocs/configuration.md.env.examplewith the new variable