ECONNRESET
means connection reset by peer. The remote server (or something on the network path) closed the connection unexpectedly. This is usually caused by the external service or a misconfiguration, not by Vercel.
- Persistent errors: Usually a setup or configuration issue (wrong protocol, port, or missing allowlist).
- Intermittent errors: Often external (e.g., provider maintenance, load spikes, or deployment changes). Check provider logs and metrics to correlate timing.
Other possible triggers:
- Provider timeouts or rate limiting
- Protocol/TLS mismatches
- IP allowlisting issues (default Vercel egress IPs are dynamic; use Secure Compute or Static IPs for dedicated IPs)
- Running functions far from the provider region (learn to configure your Vercel Function Region here).
- Check with your provider: Did they receive the request? (If yes, proceed to contact Vercel Support)
- Inspect Vercel Runtime Logs: Look for request details and error timing.
- Enable NODE_DEBUG: Add an environment variable to your project
NODE_DEBUG=http,https,net
to capture detailed network activity. - Add timeouts and retries: Handle transient resets with capped backoff retries.
- Limit concurrency: Avoid flooding the provider with parallel requests.
If your provider confirms they received the request but you still see ECONNRESET
, reach out via the Support Center. Include:
- Deployment URL and function route
- Timestamp (UTC) and function region
- Runtime (Node.js)
- Runtime Logs for the request
- Any additional information that the provider can provide about the request
- Place your functions in regions close to your data source
- Use Secure Compute or Static IPs for dedicated egress IPs if your provider requires allowlisting
- Always set timeouts, retries, and concurrency limits
- Monitor patterns with Observability to spot issues early