Port issue on flask app deployment

I am trying to deploy my flask app to render but I keep getting this warning

==> Port scan timeout reached, failed to detect open port 9999 from PORT environment variable. Bind your service to port 9999 or update the PORT environment variable to the correct port.

Until it eventually times out and the deployment fails

What I have done so far

  1. I have set a port number as env thus the 9999.
  2. I have configured my app so it listens to not

But all these have not borne any fruit.

Please what exactly is the issue?

Please contact us directly from the dashboard using the ‘Help’ link in the top nav and make sure you select the problematic service here so we can investigate,


Thank you. i have done that

Hi, I’m encountering the same issue with deploying flask app with its docker image. Has this issue been solved?