mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-09 04:57:04 +03:00
Raise timeout
This commit is contained in:
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user