gunicorn --reload
doesn't work with Uvicorn workers. Bug?
#1638
-
I have a trivial FastAPI application in from fastapi import FastAPI
app = FastAPI()
@app.get('/')
async def hello():
# return "hello!"
return {"msg": "hello!"} I am running this using Gunicorn with Uvicorn workers as follows: gunicorn --reload --worker-class 'uvicorn.workers.UvicornWorker' 'hello:app' You can make requests to this server using When I make a change to When I run directly with Uvicorn, reloading works fine: uvicorn --reload 'hello:app Is this a Gunicorn bug, a Uvicorn bug, or a "known-bad" interaction? I am happy to use |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Kind of a bad already known interaction. Currently, the Uvicorn worker doesn't reload with gunicorn. Use Uvicorn standalone for development. I'm unable to post references for now, but I have a closed PR with this fix I think. |
Beta Was this translation helpful? Give feedback.
Kind of a bad already known interaction. Currently, the Uvicorn worker doesn't reload with gunicorn. Use Uvicorn standalone for development.
I'm unable to post references for now, but I have a closed PR with this fix I think.