Skip to content

Commit 79ed28b

Browse files
kalilsntefkah
andauthored
Increase connection count and set timeouts on pool (#1226)
Co-authored-by: Thomas F. K. Jorna <[email protected]>
1 parent ee96dc3 commit 79ed28b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

core/kysely/database-init.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ export const createDatabase = (options: DatabaseOptions) => {
3333
const dialect = new PostgresDialect({
3434
pool: new pg.Pool({
3535
connectionString: options.url,
36+
idle_in_transaction_session_timeout: 1000,
37+
connectionTimeoutMillis: 10_000,
38+
max: 20,
3639
}),
3740
});
3841

0 commit comments

Comments
 (0)