uvicorn-gunicorn-fastapi-docker icon indicating copy to clipboard operation
uvicorn-gunicorn-fastapi-docker copied to clipboard

Requests are too slow.

Open Akado2009 opened this issue 3 years ago • 3 comments

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?

Akado2009 avatar Aug 13 '21 13:08 Akado2009

same for me :(

cherijs avatar Aug 30 '21 06:08 cherijs

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.

flyingjoe avatar Sep 22 '21 22:09 flyingjoe

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.

iamthen0ise avatar Sep 23 '21 07:09 iamthen0ise