Cloud Computing
AWS Lambda intermittently cannot reach RDS after scaling
troublesync_editorial
2mo ago
Environment
Environment
Node.js Lambda in a VPC connecting to PostgreSQL through RDS Proxy.
What happens
What happens
Connection timeouts occur only during traffic bursts and disappear after several minutes.
What I have tried
What I have tried
Raised Lambda timeout and database max_connections.
I would appreciate advice on how to identify the root cause without risking existing data or configuration.
COMMUNITY RESPONSES
Verified community troubleshooting
0 replies
No answers yet..
Showing 0 of 0 community responses
AI DIAGNOSTICS
Incident analysis
Most likely causes
Connections are not reused correctly or the proxy pool is exhausted during concurrency spikes. 81%
A recent software, firmware or configuration change is exposing an existing compatibility issue. 33%
Summary
The reported behaviour is consistent with connections are not reused correctly or the proxy pool is exhausted during concurrency spikes. The safest next step is to verify that hypothesis with a reversible test before making permanent configuration changes.
Suggested Fixes
Verify the likely cause
Create the client outside the handler, release connections, inspect proxy borrow latency and cap reserved concurrency to database capacity.
Validate and monitor
Reproduce the issue once after the change, review relevant logs or metrics, and keep a rollback path until the system has remained stable.
Continue troubleshooting
Related troubles
Matched from the title, description and tags
- Servers24% match
Node.js + PM2 server exhausts ephemeral ports (TIME_WAIT) during traffic bursts causing upstream connection failures and 502s
Open0 answers - Servers23% match
PM2-managed Node.js behind NGINX exhausts ephemeral ports (TIME_WAIT spike) during traffic bursts causing intermittent 502s
Open1 answer - Databases23% match
PostgreSQL refuses new clients with 'too many connections' after scaling Node workers
Open1 answer - Servers21% match
Nginx returns 502 Bad Gateway when proxying to local Node.js upstream intermittently
Open0 answers - Programming21% match
Prisma P1001: cannot reach database server from deployed Node service
Open1 answer