debugMajor
Serverless function timeout from synchronous operations
Viewed 0 times
function timeoutcold connectionRDS Proxyconnection reuseAbortController
nodejsdocker
Error Messages
Problem
Serverless functions timeout in production. Works locally but times out deployed. Common with database connections and external API calls.
Solution
Common causes: (1) Cold DB connections — reuse between invocations, use RDS Proxy. (2) DNS resolution in VPC. (3) External API hanging — set explicit timeouts with AbortController. (4) Large payload — use streaming or queue. (5) Connection pool exhaustion — use minimal pool size. (6) Increase function timeout.
Why
Serverless functions have hard timeout limits. Every external call must have its own timeout shorter than the function timeout.
Revisions (0)
No revisions yet.