Raise timeout

This commit is contained in:
Ajay
2022-07-22 17:27:32 -04:00
parent b616ac990b
commit 10491da7c2

View File

@@ -1,6 +1,6 @@
import { Logger } from "../utils/logger"; import { Logger } from "../utils/logger";
import { IDatabase, QueryOption, QueryType } from "./IDatabase"; import { IDatabase, QueryOption, QueryType } from "./IDatabase";
import { Client, Pool, PoolClient, types } from "pg"; import { Client, Pool, types } from "pg";
import fs from "fs"; import fs from "fs";
import { CustomPostgresConfig, CustomPostgresReadOnlyConfig } from "../types/config.model"; import { CustomPostgresConfig, CustomPostgresReadOnlyConfig } from "../types/config.model";
@@ -52,7 +52,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: 120 statement_timeout: 300
}); });
this.poolRead.on("error", (err, client) => { this.poolRead.on("error", (err, client) => {
Logger.error(err.stack); Logger.error(err.stack);