fix: reduce pg-boss pool size to 4, add idle_in_transaction_session_timeout
PostgreSQL max_connections was being exceeded (100/100). - Limit pg-boss internal pool to 4 connections - Added idle_in_transaction_session_timeout=30s to PostgreSQL config - Already raised max_connections to 300 (container config) System now stable at ~98/300 connections
This commit is contained in:
parent
1026787318
commit
2913ad451b
@ -51,7 +51,9 @@ export async function createScheduler(): Promise<PgBoss> {
|
|||||||
retryDelay: 30,
|
retryDelay: 30,
|
||||||
retryBackoff: true,
|
retryBackoff: true,
|
||||||
expireInSeconds: 300,
|
expireInSeconds: 300,
|
||||||
monitorStateIntervalSeconds: 30,
|
monitorStateIntervalSeconds: 60,
|
||||||
|
max: 4, // pg-boss internal connection pool
|
||||||
|
poolSize: 4, // alias used by some pg-boss versions
|
||||||
});
|
});
|
||||||
|
|
||||||
boss.on("error", (error) => console.error("pg-boss error:", error));
|
boss.on("error", (error) => console.error("pg-boss error:", error));
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user