You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(webapp): per-client database pool and connect timeout overrides
Adds optional per-client env overrides for the Prisma pool_timeout and connect_timeout, one pair each for the writer and read replica of the control-plane, legacy run-ops, and run-ops databases, falling back to the shared DATABASE_POOL_TIMEOUT / DATABASE_CONNECTION_TIMEOUT when unset.
This lets each database be tuned independently, e.g. a fail-fast connect timeout on one without changing the others. It also tags each client's queries with its specific datasource (control-plane, legacy-run-ops, or run-ops; writer or replica) so telemetry can attribute connection behavior per database. No behavior change until an override is set.
Allow the database connection pool and connect timeouts to be tuned separately for each database's writer and read replica, falling back to the shared defaults when unset.
"must not be a known-insecure published default; set a strong, unique value. If you cannot rotate it yet (e.g. it protects existing encrypted data or active sessions), set ALLOW_INSECURE_DEFAULT_SECRETS=1 to boot while you migrate.";
110
110
111
+
/** Optional int env var; blank/whitespace normalises to undefined (z.coerce turns "" into 0). */
Copy file name to clipboardExpand all lines: docs/self-hosting/env/webapp.mdx
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,7 +26,11 @@ mode: "wide"
26
26
|`DATABASE_CONNECTION_LIMIT`| No | 10 | Max DB connections. |
27
27
|`DATABASE_POOL_TIMEOUT`| No | 60 | DB pool timeout (s). |
28
28
|`DATABASE_CONNECTION_TIMEOUT`| No | 20 | DB connect timeout (s). |
29
+
|`DATABASE_WRITER_POOL_TIMEOUT`| No |`DATABASE_POOL_TIMEOUT`| Writer pool timeout (s); overrides the shared default for the writer only. |
30
+
|`DATABASE_WRITER_CONNECTION_TIMEOUT`| No |`DATABASE_CONNECTION_TIMEOUT`| Writer connect timeout (s); overrides the shared default for the writer only. |
29
31
|`DATABASE_READ_REPLICA_URL`| No |`DATABASE_URL`| Read-replica DB string. |
32
+
|`DATABASE_READ_REPLICA_POOL_TIMEOUT`| No |`DATABASE_POOL_TIMEOUT`| Read-replica pool timeout (s); overrides the shared default for the replica only. |
33
+
|`DATABASE_READ_REPLICA_CONNECTION_TIMEOUT`| No |`DATABASE_CONNECTION_TIMEOUT`| Read-replica connect timeout (s); overrides the shared default for the replica only. |
0 commit comments