From be204fe873de26233d5f864dbef75b35fddfa1f8 Mon Sep 17 00:00:00 2001 From: Ajay Date: Fri, 12 Aug 2022 15:31:19 -0400 Subject: [PATCH] Lower postgres read timeout, raise statment timeout --- src/databases/Postgres.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/databases/Postgres.ts b/src/databases/Postgres.ts index f145aad..dca5a46 100644 --- a/src/databases/Postgres.ts +++ b/src/databases/Postgres.ts @@ -32,7 +32,7 @@ export class Postgres implements IDatabase { private poolRead: Pool; private lastPoolReadFail = 0; - private readTimeout = 250; + private readTimeout = 150; private maxTries = 3; @@ -57,7 +57,7 @@ export class Postgres implements IDatabase { if (this.config.postgresReadOnly && this.config.postgresReadOnly.enabled) { this.poolRead = new Pool({ ...this.config.postgresReadOnly, - statement_timeout: 1000 + statement_timeout: 1500 }); this.poolRead.on("error", (err, client) => { Logger.error(err.stack);