Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

grpc-js client hangs when server sends metadata > 64KB #2399

Open
alexandervain opened this issue Mar 26, 2023 · 1 comment
Open

grpc-js client hangs when server sends metadata > 64KB #2399

alexandervain opened this issue Mar 26, 2023 · 1 comment

Comments

@alexandervain
Copy link

Problem description

When a server responds with headers/trailers exceeding ~64KB, the client hangs (callback is not triggered).

Reproduction steps

  • Start a server that adds > 64KB to response headers/trailers.
  • Create a client for that service and call it
  • --> Client hangs

Here is a test demonstrating the issue

Environment

  • OS name, version and architecture: macOS Monterey 12.5.1, Apple M1 Max
  • Node version: 16.17.0
  • Node installation method: yarn
  • Package name and version: @grpc/[email protected]

Additional context

The issue seems to be related to this on - #1533, though with a bit different setup. That issue had the provided reproduction - those tests pass now(with updated Node/@grpc/grpc-js versions).
I forked the reproduction repo to update the tests setup:

  • new test demonstrates client hanging when server send trailer of ~65KB size.
  • lower level Node's HTTP2 test reproduces similar behavior - it hangs (no client-side events fired) on metadata that is > 64KB.
    • when metadata exceeding the maxSendHeaderBlockLength setting, server throws frameError (demonstrated in this test) - but since this change applying maxSendHeaderBlockLength: Number.MAX_SAFE_INTEGER that's not the case with @grpc/grpc-js anymore
@murgatroid99
Copy link
Member

If this happens with Node's http2 module without any involvement of gRPC, then it seems like the issue is more suited to the Node repository than to this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants