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 handler error: "8 RESOURCE_EXHAUSTED: Received message larger than max (6771289 vs. 4194304)" #7137

Open
4 tasks
cristianbriscaru opened this issue Jun 21, 2024 · 3 comments

Comments

@cristianbriscaru
Copy link

Issue workflow progress

Progress of the issue based on the
Contributor Workflow

Make sure to fork this template and run yarn generate in the terminal.

Please make sure Mesh package versions under package.json matches yours.

  • 2. A failing test has been provided
  • 3. A local solution has been provided
  • 4. A pull request is pending review

Describe the bug

When using grpahql-mesh with the grpc handler when making a request if the grpc response is greater than the default max size there will be an error thrown : "8 RESOURCE_EXHAUSTED: Received message larger than max (6771289 vs. 4194304)".

This is caused by the grpc client default max_receive_message_length : 4194304 : grpc/grpc-node#1093.

The only fix for this issue would be to pass a "grpc.max_receive_message_length" config option to the grpc client but grpahql-mesh doesn't support this.

To Reproduce Steps to reproduce the behavior:
To reproduce make a request where the response size is greater than 4194304

Expected behavior

A way to pass config options to the grpc client

sources:
  - name: MyGRPCService
    handler:
      grpc:
        endpoint: 'localhost:50051'
        options:
          'grpc.max_receive_message_length':  10000000

Or a way to pass a custom client to the handler

sources:
  - name: MyGRPCService
    handler:
      grpc:
        client: ./custom-grpc-client.js

Environment:

  • OS:
  • @graphql-mesh/...:
  • NodeJS:

Additional context

@ardatan
Copy link
Owner

ardatan commented Jun 21, 2024

Thanks for creating the issue!
PRs are welcome if anyone is interested in implementing this missing option!

@Georg-Mirchev
Copy link

Any updates?

@akateliev
Copy link

Looking for this feature !

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

No branches or pull requests

4 participants