Change postgres timeout values

This commit is contained in:
Ajay
2022-07-24 15:41:09 -04:00
parent 23add072f3
commit 954c3db649

View File

@@ -32,7 +32,7 @@ export class Postgres implements IDatabase {
private poolRead: Pool; private poolRead: Pool;
private lastPoolReadFail = 0; private lastPoolReadFail = 0;
private readTimeout = 400; private readTimeout = 250;
private maxTries = 3; private maxTries = 3;
@@ -57,7 +57,7 @@ export class Postgres implements IDatabase {
if (this.config.postgresReadOnly && this.config.postgresReadOnly.enabled) { if (this.config.postgresReadOnly && this.config.postgresReadOnly.enabled) {
this.poolRead = new Pool({ this.poolRead = new Pool({
...this.config.postgresReadOnly, ...this.config.postgresReadOnly,
statement_timeout: 300 statement_timeout: 1000
}); });
this.poolRead.on("error", (err, client) => { this.poolRead.on("error", (err, client) => {
Logger.error(err.stack); Logger.error(err.stack);