mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-06 19:47:00 +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 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);
|
||||
|
||||
Reference in New Issue
Block a user