10 months ago
I have two apps connected to the Postgres database, each with a connection pool size of 20.
const db: any = {
type: 'postgres',
url: DATABASE_URL,
entities: [`${__dirname}/entity/*.entity{.ts,.js}`],
migrations: [`${__dirname}/migrations/*{.ts,.js}`],
logging: 'all',
extra: {
max: 20,
min: 5,
idleTimeoutMillis: 30000,
connectionTimeoutMillis: 10000
}
};but running an estres test with k6 browser, i get this error with around 3-4k users calling 3 endpoint, 1 of them being cache 95% of the time:
timeout exceeded when trying to connect [
'Error: timeout exceeded when trying to connect\n' +
' at Timeout._onTimeout (/app/node_modules/pg-pool/index.js:205:27)\n' +
' at listOnTimeout (node:internal/timers:594:17)\n' +
' at process.processTimers (node:internal/timers:529:7)',
'ExceptionsHandler'
]
2025-04-07T03:22:55.583Z [error] - timeout exceeded when trying to connect
That makes the API and database unresponsive.
2 Replies
10 months ago
guys, any update on this?
Status changed to Awaiting User Response Railway • 10 months ago
6 months ago
This thread has been marked as solved automatically due to a lack of recent activity. Please re-open this thread or create a new one if you require further assistance. Thank you!
Status changed to Solved Railway • 6 months ago