Deploy fails with Port scan timeout reached, no open ports detected

Hi,

I am facing issues during deploy and getting Port scan timeout reached, no open ports detected error**.**

It is a FastAPI application. I have created environment variable PORT with value as 8000
Start command - uvicorn app.main:app --host 0.0.0.0 --port $PORT
Even though this error is shown in the logs, I believe that the Build and deploy is going through. I see message Running ‘uvicorn app.main:app --host 0.0.0.0 --port $PORT’

Post this, it also shows print output form my main.py. But fails afterwards with a message
==> Port scan timeout reached, no open ports detected. Bind your service to at least one port. If you don’t need to receive traffic on any port, create a background worker instead.

==> Docs on specifying a port: https://render.com/docs/web-services#port-binding

==> Timed out: Port scan timeout reached, no open ports detected. Bind your service to at least one port. If you don’t need to receive traffic on any port, create a background worker instead.

Is it a memory related issue as I am on a free tier and have only got 512 MB at my disposal? I tried to upgrade the instance but it does not allow me to do so as deploy is not going through.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.