Linux TCP Ephemeral Port Exhaustion (Cannot Assign Requested Address)

Short-lived outbound connections saturated `ip_local_port_range` in TIME_WAIT.

Runs locally in browser Free · No login Independently Verified 2026-11-25 v4.1.0
Identifier: Linux TCP Ephemeral Port Exhaustion (Cannot Assign Requested Address) Platform: Linux
Common Root Causes:
  • Short-lived outbound connections saturated `ip_local_port_range` in TIME_WAIT.

Interactive Diagnostic Checklist

Verified Solutions:
  1. Enable HTTP keep-alive connection pooling and widen `ip_local_port_range=10240 65535`.
Safe Diagnostic Command:
ss -s && sysctl net.ipv4.ip_local_port_range
Warning: Verify configuration changes in staging or with dry-run flags (e.g. nginx -t) before reloading production services.

Technical Explanation

Short-lived outbound connections saturated `ip_local_port_range` in TIME_WAIT. Recommended diagnostic: `ss -s && sysctl net.ipv4.ip_local_port_range`. Remediation: Enable HTTP keep-alive connection pooling and widen `ip_local_port_range=10240 65535`.

Worked Examples

  • Run `ss -s && sysctl net.ipv4.ip_local_port_range` to verify root cause before applying the remediation.

Limitations & Assumptions

  • Always verify configuration changes in staging or with dry-run flags (e.g. `nginx -t`) before reloading production services.

Source References & Verification

Resource ID: err-linux-time-wait-port-exhaustion · Independently verified: 2026-11-25

Related Resources