Description
When attempting multiple connections over a port forwarded to a container (oc port-forward
), there seems to be a limit of 5 on the number of concurrent connections. Once there are more, connections hang / timeout and don't seem to recover.
This was encountered with a nodejs container in trying to use the node-inspector debugger app which listens on two non-public ports, the HTTP port presenting an HTML5 webapp that loads a number of assets concurrently. Here is typical output from the port-forward:
I0819 13:28:57.321178 18067 portforward.go:225] Forwarding from 127.0.0.1:8080 -> 8080
I0819 13:28:57.321270 18067 portforward.go:225] Forwarding from [::1]:8080 -> 8080
I0819 13:28:57.321298 18067 portforward.go:225] Forwarding from 127.0.0.1:5858 -> 5858
I0819 13:28:57.321327 18067 portforward.go:225] Forwarding from [::1]:5858 -> 5858
I0819 13:29:13.399831 18067 portforward.go:251] Handling connection for 8080
I0819 13:29:37.633514 18067 portforward.go:251] Handling connection for 8080
I0819 13:29:37.633844 18067 portforward.go:251] Handling connection for 8080
I0819 13:29:37.633880 18067 portforward.go:251] Handling connection for 8080
I0819 13:29:37.633893 18067 portforward.go:251] Handling connection for 8080
I0819 13:29:38.107638 18067 portforward.go:251] Handling connection for 8080
I0819 13:29:38.108131 18067 portforward.go:251] Handling connection for 8080
E0819 13:30:07.719444 18067 portforward.go:310] An error occurred forwarding 8080 -> 8080: Timed out waiting for data stream
E0819 13:30:07.795932 18067 portforward.go:310] An error occurred forwarding 8080 -> 8080: Timed out waiting for data stream
E0819 13:30:07.795949 18067 portforward.go:310] An error occurred forwarding 8080 -> 8080: Timed out waiting for data stream
I0819 13:30:07.796389 18067 portforward.go:251] Handling connection for 8080
I0819 13:30:07.796474 18067 portforward.go:251] Handling connection for 8080
E0819 13:30:08.201089 18067 portforward.go:280] Error creating forwarding stream for port 8080 -> 8080: Timeout occured
E0819 13:30:08.201713 18067 portforward.go:280] Error creating forwarding stream for port 8080 -> 8080: Timeout occured
E0819 13:30:37.796628 18067 portforward.go:262] Error creating error stream for port 8080 -> 8080: Timeout occured
Individual serialized requests succeed indefinitely. Only concurrency seems to be an issue. This makes the debugger entirely unusable. Since it assumes two ports on the same host I can't even expose it usefully via service/route as a workaround. I haven't tried it with any other application yet; it's possible it would work differently.