Skip to content

Instantly share code, notes, and snippets.

@lixiaoquan
Last active March 9, 2021 04:06
Show Gist options
  • Save lixiaoquan/f94c8eb819744ae8bc5e235368612979 to your computer and use it in GitHub Desktop.
Save lixiaoquan/f94c8eb819744ae8bc5e235368612979 to your computer and use it in GitHub Desktop.
Solve too large protocol message

Error

When use ParseFromString(), protobuf reports

"[libprotobuf ERROR google/protobuf/io/coded_stream.cc:207] A protocol message was rejected because it was too big (more than 67108864 bytes). To increase the limit (or to disable these warnings), see CodedInputStream::SetTotalBytesLimit() in google/protobuf/io/coded_stream.h."

Environment

  • System ubuntu 18.04
  • Python 3.6.9

Solution

Update protobuf >= 3.2

pip3 install protobuf==3.14.0

Reference

https://github.com/protocolbuffers/protobuf/releases/tag/v3.2.0

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