Skip to content

Resolve issues with SQL maximum open connections#360

Merged
aeneasr merged 8 commits intoprepare-releasefrom
fix-sql
Jan 22, 2017
Merged

Resolve issues with SQL maximum open connections#360
aeneasr merged 8 commits intoprepare-releasefrom
fix-sql

Conversation

@aeneasr
Copy link
Copy Markdown
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