Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve issues with SQL maximum open connections #360

Merged
merged 8 commits into from
Jan 22, 2017
Merged

Conversation

aeneasr
Copy link
Member

@aeneasr aeneasr commented Jan 13, 2017

This PR introduces max_conn_lifetime, max_idle_conns and max_conns to the SQL DSN which lets you configure the maximum lifetime a connection may stay alive, the maximum number of idle connections and the maximum overall connections. All settings have sensible defaults. You can set them like this:

DATABASE_URL=postgres://hydra:secret@postgresd:5432/hydra?sslmode=disable&max_conn_lifetime=10s&max_idle_conns=10&max_conns=20

max_conn_lifetime parses the duration, so you'll be able to say: 10s, 10m, 10h, ...

@aeneasr aeneasr merged commit 01e9891 into prepare-release Jan 22, 2017
@aeneasr aeneasr deleted the fix-sql branch May 6, 2017 20:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants