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

CancelledError raised on app startup in Argo CD #2509

Open
ishaan-mehta opened this issue Nov 11, 2024 · 1 comment
Open

CancelledError raised on app startup in Argo CD #2509

ishaan-mehta opened this issue Nov 11, 2024 · 1 comment

Comments

@ishaan-mehta
Copy link

I have a FastAPI app that uses uvicorn, and when I run locally with Docker on colima, I never encounter this error, but when I run that same app in Argo CD, I keep seeing the following error and the app immediately shuts down:

INFO:     Application startup complete.
INFO:     Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)
ERROR:    Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/starlette/routing.py", line 700, in lifespan
    await receive()
  File "/usr/local/lib/python3.12/site-packages/uvicorn/lifespan/on.py", line 137, in receive
    return await self.receive_queue.get()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/asyncio/queues.py", line 158, in get
    await getter
asyncio.exceptions.CancelledError

(This is transient, however — very rarely, the app does manage to get past this and start without issue.)

As far as I can tell, this error is never supposed to actually surface to the user. How can I solve this? Is this an issue with uvicorn? An issue with starlette? (I am not using Ctrl-C or interacting with the app at all, which I have seen suggested on similar discussions online.)

Originally posted by @ishaan-mehta in #2495

@Wurstnase
Copy link

I see a similar problem in my setup.

Maybe it is an issue with the latest websockets major release?
On my test setup a downgrade to websockets==13.1 will fix the issue.

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

2 participants