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

Restore gRPC limitation for protobuf data size to the default (4MB) #86

Open
huan opened this issue Oct 26, 2020 · 2 comments
Open

Restore gRPC limitation for protobuf data size to the default (4MB) #86

huan opened this issue Oct 26, 2020 · 2 comments
Labels
enhancement New feature or request

Comments

@huan
Copy link
Member

huan commented Oct 26, 2020

We have increased the gRPC data size for protobuf from 4MB to 100MB by #41, which introduced the event loop blocking problem described by #80, then we solved this problem by adding the stream support to our gRPC service by wechaty/grpc#96.

So we will restore the default size to our gRPC service to keep our service robust.

CC: @su-chang

@huan
Copy link
Member Author

huan commented Oct 26, 2020

For multi-language Wechaty, please upgrade your gRPC service by replacing the old messageFile to messageFileStream for receiving files larger than 4MB because the messageFile will throw an exception when the Protocol Buffers data size is larger than 4MB.

@wechaty/python @wechaty/go @wechaty/java @wechaty/php @wechaty/scala @wechaty/dotnet

Resources

  1. TypeScript implementation: https://github.com/wechaty/wechaty-puppet-service/tree/main/src/file-box-stream
  2. gRPC definition: add file stream and image stream rpc call grpc#88

@huan
Copy link
Member Author

huan commented Oct 6, 2021

Update (Oct, 2021)

We are deciding to use FileBox.fromUuid() with the gRPC Upload & Download to deal with the large files.

See:

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

No branches or pull requests

1 participant