Lower postgres read timeout, raise statment timeout

This commit is contained in:
Ajay
2022-08-12 15:31:19 -04:00
parent 6804e7d7a8
commit be204fe873

View File

@@ -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);