We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1fffa54 commit b49d499Copy full SHA for b49d499
src/drivers/postgres/PostgreSqlDriver.ts
@@ -290,7 +290,12 @@ class PostgreSqlConnection extends BaseConnection {
290
const key = config.host + "//" + config.database + "/" + config.user;
291
const pgPool = await namedPool.getOrCreateAsync(key,
292
() => {
293
- const pool = new Pool(this.config);
+ const pool = new Pool({ ... this.config,
294
+ max: 20,
295
+ idleTimeoutMillis: 1000,
296
+ connectionTimeoutMillis: 1000,
297
+ maxUses: 7500
298
+ });
299
pool.on("error", (_error, _client) => {
300
// do nothing...
301
});
0 commit comments