uvicorn-gunicorn-fastapi-docker
uvicorn-gunicorn-fastapi-docker copied to clipboard
Requests are too slow.
Hi, I have a simple fastapi application (which is just showing results from teh database). I am using tiangolo/uvicorn-gunicorn-fastapi:python3.7 as a base image.
My problem is: it is just too slow, here are the result with curl:
Establish Connection: 0.000433s TTFB: 10.668261s Total: 10.704381s
. Locally, without a docker image my total time is 0.002s.
How can I tweak the image envs or whatever to make it faster?
same for me :(
It would probably be helpful if you could tell us more about your setup (platform etc.). I saw really slow requests when running the amd64 Image on arm64.
Maybe you have reload active, and have logs / db data in the same folder as fastapi app? That may cause WatchGod reload on every single file change.