Pick the fix
A Lambda spike to 800 concurrent instances exhausted Postgres's max_connections. Fix?
Hint 1 of 1
How many connections does each instance open?
Choose an answer, then open Show answer below to check it.
Show answer
Answer: A Put a pooling proxy in front of Postgres and cap function concurrency
Correct. Many instances share few connections.
Each function instance opens its own connection, and Postgres runs one process per connection. A pooler such as RDS Proxy or PgBouncer multiplexes many clients onto a few connections, and a concurrency cap bounds the burst.
Why not the others?
- B Raise max_connections to 10,000. Each connection costs memory; Postgres degrades.
- C Open a new connection per query. More connections, not fewer.
- D Disable retries. Doesn't change the instance count.