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
edc9311d7b
commit
93dd7c2e23
@ -51,7 +51,9 @@ export async function createScheduler(): Promise<PgBoss> {
|
||||
retryDelay: 30,
|
||||
retryBackoff: true,
|
||||
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));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user