When deploying my uvicorn/FastAPI on a Reserved VM (0.25 vCPU / 1GB RAM), the deployment works, but then all my endpoints time out. When I run the repl with the “Run” button, everything works as expected, as it does locally on my system. I unfortunately cannot share the repl since it is a private API endpoint used by my company.
There is nothing in logs besides the requests to “/” that Replit automatically sends at startup. Both of those requests went through fine with no errors or anything.
For repl not to hang.
Endpoints unreachable due to timeout.
Steps to reproduce:
Make a basic FastAPI/uvicorn application, try to deploy on lowest VM tier.
Bug appears at this link:
Browser: Chrome OS: Win11 Device (Android, iOS, NA leave blank): Desktop app version (Avatar menu->“Version”) or NA: Plan (Free, Replit Core): Replit Core
I’ve been able to determine the root cause of the error as the application taking too long to load, thus replit kills the process and sends an error along the lines of “no open port.” I know this is the case as when I remove the blocking code (loading large ML model), it deploys fine. I’ve experimented with warmup requests and such, but these are all a little buggy and only sometimes will the deployment work. Is there perhaps a variable to change which will increase the amount of time replit will spend waiting for a port to open?