ECONNRESET
node
network_error
ai_generated
partial
Error: read ECONNRESET
ID: node/econnreset
80%Fix Rate
85%Confidence
50Evidence
2023-01-01First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| 20 | active | — | — | — |
Root Cause
TCP connection forcibly closed by remote. Server crashed, timeout, or load balancer dropped connection.
genericOfficial Documentation
https://nodejs.org/api/errors.html#common-system-errorsWorkarounds
-
90% success Add retry logic with exponential backoff for transient network issues
const axios = require('axios'); const axiosRetry = require('axios-retry'); axiosRetry(axios, { retries: 3, retryDelay: axiosRetry.exponentialDelay }); await axios.get('https://api.example.com/data');Sources: https://nodejs.org/api/errors.html#common-system-errors
-
88% success Check server-side logs — the server is closing the connection
Check server-side logs — the server is closing the connection
Sources: https://nodejs.org/api/errors.html#common-system-errors
-
82% success If behind a proxy/LB, check its timeout settings
# Check nginx proxy timeout settings: # In nginx.conf: proxy_read_timeout 120s; proxy_connect_timeout 60s; # For AWS ALB: check idle timeout in target group settings (default 60s) # For HAProxy: timeout server 120s
Dead Ends
Common approaches that don't work:
-
Increase socket timeout to very large value
70% fail
If server crashed, waiting longer won't help
-
Disable keep-alive
65% fail
Keep-alive isn't the cause — the server actively reset the connection
Error Chain
Frequently confused with: