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

RESAURCE_EXHAUSTED - max message size #8

Open
drabekfanda opened this issue Jul 29, 2024 · 0 comments
Open

RESAURCE_EXHAUSTED - max message size #8

drabekfanda opened this issue Jul 29, 2024 · 0 comments

Comments

@drabekfanda
Copy link

Can't make max messages size larger than 209715200. Channel configuration is ok, but server can't take it.

error:

_grpc._channel._InactiveRpcError: <InactiveRpcError of RPC that terminated with:
status = StatusCode.RESOURCE_EXHAUSTED
details = "grpc: received message larger than max (236075865 vs. 209715200)"
debug_error_string = "UNKNOWN:Error received from peer ipv6:%5B::1%5D:3333 {grpc_message:"grpc: received message larger than max (236075865 vs. 209715200)", grpc_status:8, created_time:"2024-07-29T11:06:44.1927981+00:00"}"

code:

MAX_MESSAGE_LENGTH = (2 ** 20) * 500
class A2lParser(object):
def init(self, string):
self._dll = ctypes.cdll.LoadLibrary(os.path.join(os.path.dirname(file), 'a2l_grpc', get_shared_object_name()))
channel = grpc.insecure_channel('localhost:3333', options=[
('grpc.max_message_length', MAX_MESSAGE_LENGTH),
('grpc.max_send_message_length', MAX_MESSAGE_LENGTH),
('grpc.max_receive_message_length', MAX_MESSAGE_LENGTH),
])
client = A2LStub(channel)
if self._dll.Create(3333):
raise Exception(1)
self.ast = client.GetTreeFromA2L(TreeFromA2LRequest(a2l=string.encode())).tree

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

1 participant