Answered in the SO post. Let's continue the discussion there. On Friday, January 29, 2021 at 7:25:21 AM UTC-8 Michael McCarthy wrote:
> Hi folks, > > I have an asyncio gRPC client that is used in a multithreaded environment. > When multiple threads connect to the service via the client simultaneously, > I see a stream of the following errors: > 2021-01-27 09:33:56,937 ERROR [asyncio] [thread_0] Exception in callback > PollerCompletionQueue._handle_events()() handle: )()> Traceback (most > recent call last): File "/usr/local/lib/python3.8/asyncio/events.py", line > 81, in _run self._context.run(self._callback, *self._args) File > "src/python/grpcio/grpc/_cython/_cygrpc/aio/completion_queue.pyx.pxi", line > 147, in grpc._cython.cygrpc.PollerCompletionQueue._handle_events > BlockingIOError: [Errno 11] Resource temporarily unavailable 2021-01-27 > 09:33:56,937 ERROR [asyncio] [thread_1] Exception in callback > PollerCompletionQueue._handle_events()() handle: )()> Traceback (most > recent call last): File "/usr/local/lib/python3.8/asyncio/events.py", line > 81, in _run self._context.run(self._callback, *self._args) File > "src/python/grpcio/grpc/_cython/_cygrpc/aio/completion_queue.pyx.pxi", line > 147, in grpc._cython.cygrpc.PollerCompletionQueue._handle_events > BlockingIOError: [Errno 11] Resource temporarily unavailable > > The requests appear to be completing successfully, however, the messages > are flooding my logs and making me nervous! > > In my tests, each thread creates its own channel and submits its own async > requests. The errors occur regardless of the load on the service. The > errors do not occur if the clients are running in different processes. > > My setup: > > - Python version: 3.8.6 > - grpcio version: 1.35.0 > > Is the behaviour expected? Any insight is appreciated! > > I've also created this SO post > <https://stackoverflow.com/questions/65945944/multi-thread-support-for-python-asyncio-grpc-clients> > . > -- You received this message because you are subscribed to the Google Groups "grpc.io" group. To unsubscribe from this group and stop receiving emails from it, send an email to grpc-io+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/ba5eb3de-fbe4-4262-b779-f8f18e6ea472n%40googlegroups.com.