python-betterproto
python-betterproto copied to clipboard
How to properly use stream_unary ?
I am currently doing it like this:
async with Channel(host, port, ssl=ssl) as channel:
stub = stub_function(channel)
response = await getattr(stub, method_function)(request_iterator_function(**arguments))
However 1) it disconnects about every 180 minutes, error grpclib.exceptions.GRPCError: (<Status.UNKNOWN: 2>, “Received :status = ‘413’“, None grpclib.exceptions.StreamTerminatedError: Stream reset by remote party, error_code: 0 (however the remote party did not reset the connection) 2) grpclib.exceptions.ProtocolError: Request was not sent - by the code it is related to the end= argument, however as my stream_unary is supposed to be continuous, never ending connection - I don’t get it