Cloud Run stops routing requests to a healthy instance after an abruptly rejected WebSocket upgrade

We reproduced unexpected behavior in a small Cloud Run test service:

  • A WebSocket upgrade arrives with a malformed URL. Our Node.js service rejects it using socket.destroy() without sending an HTTP response.

  • Cloud Run reports the failed upgrade as HTTP 500 and subsequently stops routing all new requests, including ordinary API requests, to that instance.

  • The application continues running normally, existing WebSockets remain usable, and the liveness probe stays healthy.

  • The instance appears to remain in a draining state for the configured request timeout—30 minutes in our test—before replacement.

Repeating this request across instances can effectively remove the entire fleet from serving new requests for 30 minutes.

We could not find a log entry or metric indicating that an instance had been excluded from routing or had started draining. The failed request is visible; the resulting instance state is not.

Two controls did not reproduce this behavior:

  • Rejecting the WebSocket upgrade with a complete HTTP error response before closing the connection.

  • Calling socket.destroy() on an ordinary HTTP request.

Is this expected Cloud Run behavior, or a bug? Specifically:

  1. Why does one abruptly rejected WebSocket upgrade exclude a healthy instance from handling subsequent requests?

  2. Why does replacement wait for the request timeout while liveness remains healthy?

  3. Which logs or metrics expose this routing exclusion or drain state?

The rejection code has existed for a long time; we had not observed this behavior previously. Has this behavior changed recently?

The control where a complete HTTP error response does not reproduce this points to the abrupt close leaving the request counted as in-flight until the timeout expires. Have you tested whether a lower request timeout or different container concurrency changes how quickly the instance returns to rotation? Checking a single-instance revision could also help rule out draining of existing connections.

Yes, instance timeout works. We tested a 1-minute timeout: the instance was replaced after approximately one minute. However, one dropped WebSocket upgrade stops all new API requests to that instance, despite concurrency being 300 and liveness probes remaining healthy.

I’d appreciate if someone from the Cloud Run team could suggest what triggers this instance-wide routing exclusion, whether that behavior changed around October 5, 2026, and how to observe it in logs or metrics?