This message was deleted.
# support
s
This message was deleted.
a
Using https://docs.aiohttp.org/en/stable/deployment.html#start-gunicorn gives
Copy code
[2022-10-27 21:55:00 +0000] [20] [INFO] Worker exiting (pid: 20)
[2022-10-27 21:55:00 +0000] [12] [ERROR] Exception in gunicorn worker
Traceback (most recent call last):
  File "/opt/venv/lib/python3.9/site-packages/aiohttp/worker.py", line 57, in run
    self.loop.run_until_complete(self._task)
  File "uvloop/loop.pyx", line 1517, in uvloop.loop.Loop.run_until_complete
  File "/opt/venv/lib/python3.9/site-packages/aiohttp/worker.py", line 77, in _run
    raise RuntimeError(
RuntimeError: wsgi app should be either Application or async function returning Application, got <opentelemetry.instrumentation.fastapi._InstrumentedFastAPI object at 0x7f3f5b212fa0>
This is a no-win situation, Gunicorn with UvicornH11Worker has the same trouble of uvicorn with multiple workers
it doesn't send GRPC
and normal UnicornWorker doesn't allow asyncio operations for me
p
@Srikanth Chekuri should have the most insights on this
@Srikanth Chekuri can you please help Abhinav configure python instrumentation when you get some time?
s
A lot of this info is contextual to your application codebase so I won’t be much helpful. You have two options either use gunicorn with worker class which seems to be not so great given other things about your codebase or just use single worker with uvicorn which I think is the best option here.
a
can we sync , there should be some better solution, if I understand problem properly maybe I can try a custom gunicorn class or something
whenever u are free LMK
s
if I understand problem properly maybe I can try a custom gunicorn class or something
You are the best person to do this because you work with the codebase and know why certain libraries were and how they are conflicting here.
whenever u are free LMK
Before we do this, if you can share me minimal app which has the problem I can probably spend some understanding what is happening and see what can be done about it.
@Abhinav Ramana if you haven’t already seen these docs here is the official recommendation and options to extend using subclasses https://www.uvicorn.org/deployment/#gunicorn.