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

Can't receive messages larger than 4MiB #3594

Closed
drigz opened this issue Jul 7, 2017 · 7 comments
Closed

Can't receive messages larger than 4MiB #3594

drigz opened this issue Jul 7, 2017 · 7 comments
Assignees
Labels
api: pubsub Issues related to the Pub/Sub API. priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@drigz
Copy link

drigz commented Jul 7, 2017

Cloud Pub/Sub has a maximum message size of around 10 MiB (source). gRPC has a default max message size of 4MiB, so there are valid messages that cannot be pulled by google-cloud-python.

These messages appear to be silently dropped, as the pull request generates <_Rendezvous of RPC that terminated with (StatusCode.RESOURCE_EXHAUSTED, Received message larger than max (8106187 vs. 4194304))> but this is considered to be a transient error so the request is retried. When the next call to Pull() returns no messages, the application receives no messages. (behaviour may be different with production Pub/Sub servers, as I encountered this testing against an emulator)

This limit was lifted for the BigTable client in #2907, but this change didn't affect other clients. For PubSub, it can be fixed by setting the max message size options (as done for BigTable) in make_gax_publisher_api / make_gax_subscriber_api.

@tseaver tseaver added api: pubsub Issues related to the Pub/Sub API. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Jul 8, 2017
@tseaver
Copy link
Contributor

tseaver commented Jul 8, 2017

Thanks for the report! One thing I note in the changes for #2907 is the comment that "''grpc.max_message_length' will no longer be recognized in grpcio 1.1 and later". I'm unable to verify that assertion from a scan of the grpc issue tracker.

@drigz
Copy link
Author

drigz commented Jul 8, 2017 via email

@lukesneeringer
Copy link
Contributor

And it should set it to 20 MB + 1 byte.

@lukesneeringer
Copy link
Contributor

I am trying to run down how to set this properly in GAX. In theory, I would expect it to be configurable, but not sure if it is. If not, we need to add that.

@lukesneeringer lukesneeringer added the priority: p2 Moderately-important priority. Fix may not be included in next release. label Aug 7, 2017
@lukesneeringer
Copy link
Contributor

Trip from @geigerj, recording here for my personal note-taking: https://github.com/googleapis/gax-python/blob/master/google/gax/__init__.py#L206

@lukesneeringer
Copy link
Contributor

Addressed in the upcoming new library: eae7e14

@ensonic
Copy link

ensonic commented Oct 5, 2017

Thanks, you are setting the limit to 20Mb - is this configurable (overridable)? Please also note the comment @drigz posted on your change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: pubsub Issues related to the Pub/Sub API. priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

4 participants