-
-
Notifications
You must be signed in to change notification settings - Fork 8.9k
Closed
Labels
Description
First Check
- I added a very descriptive title to this issue.
- I used the GitHub search to find a similar issue and didn't find it.
- I searched the FastAPI documentation, with the integrated search.
- I already searched in Google "How to X in FastAPI" and didn't find any information.
- I already read and followed all the tutorial in the docs and didn't find an answer.
- I already checked if it is not related to FastAPI but to Pydantic.
- I already checked if it is not related to FastAPI but to Swagger UI.
- I already checked if it is not related to FastAPI but to ReDoc.
Commit to Help
- I commit to help with one of those options 👆
Example Code
@router.get('/{id}',
status_code=fastapi.status.HTTP_200_OK)
def get(id: str):
time.sleep(100)
return Response()Description
With this code, I ran server with 1 worker.
uvicorn app:app --reload --workers 1 --host 0.0.0.0 --port 8000 --log-config log_config.yaml --log-level debug
I expect only one request is available for one worker. So if I request /{id} above. no other requests are possible for 100 seconds.
However, it is possible to send another requests while time.sleep(100).
how is it possible?
Operating System
macOS
Operating System Details
No response
FastAPI Version
0.65.2
Python Version
3.8
Additional Context
No response
Reactions are currently unavailable