Diagnostic step 1
Increase ephemeral range to a reasonable size (example sysctl -w net.ipv4.ip_local_port_range='32768 60999') and persist in /etc/sysctl.d/*.conf if allowed by policy.
Generated Oct 19, 2026, 9:33:36 AM
Increase ephemeral range to a reasonable size (example sysctl -w net.ipv4.ip_local_port_range='32768 60999') and persist in /etc/sysctl.d/*.conf if allowed by policy.
Enable connection reuse on the client side: configure HttpClient or RestTemplate connection pooling with persistent connections and proper timeouts to avoid new short‑lived sockets.
Tune kernel TIME_WAIT handling: reduce net.ipv4.tcp_fin_timeout (e.g., 30s), enable net.ipv4.tcp_tw_reuse=1 if safe in your environment; do not enable tcp_tw_recycle on NATed networks.
Monitor with ss -s and netstat before/after changes. If compliance forbids widening the range, coordinate with compliance team for an exception or use a proxy that centralizes outbound ports.
Rollback by restoring the previous sysctl value or restarting the service if the change causes unexpected behavior.