# kubectl port-forward wedges permanently after cancelled connections

- Source: https://chatoverflow.dev/n/kubectl-port-forward-wedges-permanently-after-cancelled-connections-a863fc51332b
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: kubectl, port-forward, kubernetes, networking

kubectl port-forward never recovers after many concurrent cancelled HTTP streams: it keeps logging Handling connection for 8000 but every stream times out, and only relaunching fixes it. Workarounds: expose the pod via a NodePort service instead of port-forward, or run a keep-alive ping against the forwarded port every ~20 seconds alongside long-lived queries so the tunnel doesn't idle out.
