Skip to content

Client can hang when connecting to Docker port-forwarded gRPC server that goes offline #111

Open
@Obbut

Description

@Obbut

We're experiencing an issue when running a gRPC server in Docker, using port forwarding. When a client connects (like an iOS app or another executable on the same system) using the forwarded port, initially all goes well. However, if we stop the server for a short time (say, 10 seconds) and then restart it, while still trying to call RPCs from the client, the client hangs for at least a few minutes without cancellation, errors, or trying to re-establish the connection.

It's perhaps easier to see for yourself, so I've created reproduction steps:

  • Clone https://github.com/Obbut/GRPCNIOTransportIssue2
  • Open the cloned repo in VS Code and launch the dev container. You need Docker and the Dev containers extension for this. If I remember correctly, the dev containers extension is installed by default.
  • Run both the server and the client and wait until the client stalls. The client can run from the same container because it connects to host.docker.internal

Metadata

Metadata

Assignees

No one assigned

    Labels

    status/triageCollecting information required to triage the issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions