mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-08 20:47:02 +03:00
Lower postgres read timeout, raise statment timeout
This commit is contained in:
@@ -32,7 +32,7 @@ export class Postgres implements IDatabase {
|
|||||||
|
|
||||||
private poolRead: Pool;
|
private poolRead: Pool;
|
||||||
private lastPoolReadFail = 0;
|
private lastPoolReadFail = 0;
|
||||||
private readTimeout = 250;
|
private readTimeout = 150;
|
||||||
|
|
||||||
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: 1000
|
statement_timeout: 1500
|
||||||
});
|
});
|
||||||
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