Deployment fails even though build succeeds

Jul 17 04:53:21 PM  ==> Cloning from <>...
Jul 17 04:53:23 PM  ==> Checking out commit <> in branch master
Jul 17 04:53:27 PM  ==> Using Python version: 3.7.10
Jul 17 04:53:30 PM  ==> Running build command 'python -m pip install --upgrade pip && poetry install'...
Jul 17 04:53:31 PM  Collecting pip
Jul 17 04:53:31 PM    Downloading pip-22.1.2-py3-none-any.whl (2.1 MB)
Jul 17 04:53:31 PM  Installing collected packages: pip
Jul 17 04:53:31 PM    Attempting uninstall: pip
Jul 17 04:53:31 PM      Found existing installation: pip 20.1.1
Jul 17 04:53:31 PM      Uninstalling pip-20.1.1:
Jul 17 04:53:31 PM        Successfully uninstalled pip-20.1.1
Jul 17 04:53:33 PM  Successfully installed pip-22.1.2
Jul 17 04:53:35 PM  Installing dependencies from lock file
Jul 17 04:53:36 PM  
Jul 17 04:53:36 PM  Package operations: 30 installs, 0 updates, 0 removals
Jul 17 04:53:36 PM  
Jul 17 04:53:36 PM    • Installing idna (3.3)
Jul 17 04:53:36 PM    • Installing sniffio (1.2.0)
Jul 17 04:53:37 PM    • Installing anyio (3.6.1)
Jul 17 04:53:38 PM    • Installing asgiref (3.5.2)
Jul 17 04:53:38 PM    • Installing certifi (2022.6.15)
Jul 17 04:53:38 PM    • Installing charset-normalizer (2.1.0)
Jul 17 04:53:38 PM    • Installing click (8.1.3)
Jul 17 04:53:38 PM    • Installing dnspython (2.2.1)
Jul 17 04:53:38 PM    • Installing h11 (0.13.0)
Jul 17 04:53:38 PM    • Installing httptools (0.4.0)
Jul 17 04:53:38 PM    • Installing markupsafe (2.1.1)
Jul 17 04:53:38 PM    • Installing python-dotenv (0.20.0)
Jul 17 04:53:38 PM    • Installing pyyaml (6.0)
Jul 17 04:53:38 PM    • Installing six (1.16.0)
Jul 17 04:53:38 PM    • Installing typing-extensions (4.3.0)
Jul 17 04:53:43 PM    • Installing urllib3 (1.26.10)
Jul 17 04:53:44 PM    • Installing uvloop (0.16.0)
Jul 17 04:53:44 PM    • Installing watchgod (0.8.2)
Jul 17 04:53:44 PM    • Installing websockets (10.3)
Jul 17 04:53:47 PM    • Installing email-validator (1.2.1)
Jul 17 04:53:47 PM    • Installing itsdangerous (2.1.2)
Jul 17 04:53:47 PM    • Installing jinja2 (3.1.2)
Jul 17 04:53:47 PM    • Installing orjson (3.7.7)
Jul 17 04:53:47 PM    • Installing pydantic (1.9.1)
Jul 17 04:53:47 PM    • Installing requests (2.28.1)
Jul 17 04:53:47 PM    • Installing starlette (0.19.1)
Jul 17 04:53:47 PM    • Installing python-multipart (0.0.5)
Jul 17 04:53:47 PM    • Installing uvicorn (0.17.6)
Jul 17 04:53:47 PM    • Installing ujson (5.4.0)
Jul 17 04:53:54 PM    • Installing fastapi (0.79.0)
Jul 17 04:53:55 PM  ==> Generating container image from build. This may take a few minutes...
Jul 17 04:55:54 PM  ==> Uploading build...
Jul 17 04:56:52 PM  ==> Build successful 🎉
Jul 17 04:56:52 PM  ==> Deploying...
Jul 17 04:57:12 PM  ==> Starting service with 'uvicorn main:app --reload'
Jul 17 04:57:14 PM  INFO:     Will watch for changes in these directories: ['/opt/render/project/src']
Jul 17 04:57:14 PM  INFO:     Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
Jul 17 04:57:14 PM  INFO:     Started reloader process [50] using watchgod
Jul 17 04:57:20 PM  INFO:     Started server process [52]
Jul 17 04:57:20 PM  INFO:     Waiting for application startup.
Jul 17 04:57:20 PM  INFO:     Application startup complete.

The issue seems similar to this one:

Is render down?

Looks like render did not detect the right port. I set an environment variable PORT to my app port and it worked.

1 Like