You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
will result in a error while processing last request:
future: <Task finished name='Task-1000' coro=<send_request() done, defined at /tmp/test/venv/client.py:18> exception=ClientOSError(32, 'Broken pipe')>
Traceback (most recent call last):
File "/usr/lib64/python3.12/asyncio/selector_events.py", line 1075, in write
n = self._sock.send(data)
^^^^^^^^^^^^^^^^^^^^^
BrokenPipeError: [Errno 32] Broken pipe
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/tmp/test/client.py", line 21, in send_request
await session.post(f'http://127.0.0.1:8000/test?{CNT}', json={})
File "/tmp/test/venv/lib64/python3.12/site-packages/aiohttp/client.py", line 690, in _request
await resp.start(conn)
File "/tmp/test/venv/lib64/python3.12/site-packages/aiohttp/client_reqrep.py", line 1058, in start
message, payload = await protocol.read() # type: ignore[union-attr]
^^^^^^^^^^^^^^^^^^^^^
File "/tmp/test/venv/lib64/python3.12/site-packages/aiohttp/streams.py", line 643, in read
await self._waiter
aiohttp.client_exceptions.ClientOSError: [Errno 32] Broken pipe
^C closing aiohttp session
Once you've changed REQUESTS constant to 998 everything seems to work normally.
If you change worker to H11 Worker everything works okay even on higher number of requests.
If you run bare uvicorn everything works okay.
Currently I'm unable to investigate the issue further. The only difference i've found is the loop implementation, UvicornWorker uses uvloop, but creating a server to serve requests with uvloop without uvicorn + gunicorn seems to work ok. Maybe it has something to do with the sockets which gunicorn passes to worker and which are used to create server with uvloop?
The text was updated successfully, but these errors were encountered:
First of all, if it's not how you fill up the issue in this project - I'm sorry, will gladly fix.
I've experienced some issues with
uvicorn.workers.UvicornWorker
.Consider this simple example:
requirements.txt
server.py
client.py
running a server:
runnin a client:
will result in a error while processing last request:
Once you've changed
REQUESTS
constant to 998 everything seems to work normally.If you change worker to H11 Worker everything works okay even on higher number of requests.
If you run bare uvicorn everything works okay.
Currently I'm unable to investigate the issue further. The only difference i've found is the loop implementation,
UvicornWorker
uses uvloop, but creating a server to serve requests with uvloop without uvicorn + gunicorn seems to work ok. Maybe it has something to do with the sockets which gunicorn passes to worker and which are used to create server with uvloop?The text was updated successfully, but these errors were encountered: