mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat: make database connection pool size configurable (#21403)
Closes https://github.com/coder/coder/issues/21360 A few considerations/notes: - I've kept the number of conns to 10 in all other places, except coderd - which uses the config value - I opted to also make idle conns configurable; the greater the delta between max open and max idle, the more connection churn - Postgres maintains a [_process_ per connection](https://www.postgresql.org/docs/current/connect-estab.html), contrary to what the comment said previously - Operators should be able to tune this, since process churn can negatively affect OS scheduling - I've set the value to `"auto"` by default so it's not another knob one _has to_ twiddle, and sets max idle = max conns / 3 --------- Signed-off-by: Danny Kopping <danny@coder.com>
This commit is contained in:
Generated
+6
@@ -14380,6 +14380,12 @@ const docTemplate = `{
|
||||
"pg_auth": {
|
||||
"type": "string"
|
||||
},
|
||||
"pg_conn_max_idle": {
|
||||
"type": "string"
|
||||
},
|
||||
"pg_conn_max_open": {
|
||||
"type": "integer"
|
||||
},
|
||||
"pg_connection_url": {
|
||||
"type": "string"
|
||||
},
|
||||
|
||||
Generated
+6
@@ -12959,6 +12959,12 @@
|
||||
"pg_auth": {
|
||||
"type": "string"
|
||||
},
|
||||
"pg_conn_max_idle": {
|
||||
"type": "string"
|
||||
},
|
||||
"pg_conn_max_open": {
|
||||
"type": "integer"
|
||||
},
|
||||
"pg_connection_url": {
|
||||
"type": "string"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user