Build stalling & then failing on "promote"

Question:
python/fastapi project building and running both locally and on replit. However, at deployment it stalls at “promote” for a good 5-10 minutes, before then returning with a deployment failed error;

2024-02-27T21:27:07Z error: The deployment failed to initialize due to a configuration or code error. Check the logs tab for more information. For additional support, please post on https://ask.replit.com/c/help/13 and a staff member will take a look.

No issues thrown in the log; appears to start up successfully.

02/27/24 09:17:25 PM

INFO: Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)

02/27/24 09:17:25 PM

INFO: Application startup complete.

02/27/24 09:17:25 PM

INFO: Waiting for application startup.

02/27/24 09:17:25 PM

INFO: Started server process [17]

02/27/24 09:17:22 PM

forwarding local port 8080 to external port 1104

02/27/24 09:17:22 PM

starting up user application

Repl link/Link to where the bug appears:
https://replit.com/@eggmanDOTeth/frame-outcasts-1

Screenshots, links, or other helpful context:
Basic application; same general logic is running successfully on https://replit.com/@eggmanDOTeth/defigirls-frame .

Note that the given link is the second repl set up on the same codebase; attempted re-creating the repl after running into this error the first time.

code snippet

Attempted with a fresh python build (rather than python-fastapi); unfortunately still the same issue.

Problem seems to come about during port forwarding.

2024-02-27T23:48:13Z info: Deployment: 6db20d0f-6b6e-4c3f-9ed1-1434bc8320a0
2024-02-27T23:48:13Z info: Build: 070aff27-2ad9-41a4-8730-24ae349af26e
2024-02-27T23:48:13Z info: Connecting to builder
2024-02-27T23:48:14Z info: Builder connected
2024-02-27T23:48:15Z info: Installing packages
2024-02-27T23:48:15Z info: Skipping Build as no Build command set
2024-02-27T23:48:15Z info: Pushing pid1 binary layer...
2024-02-27T23:48:17Z info: Created pid1 binary layer
2024-02-27T23:48:18Z info: Skipping Python layer creation
2024-02-27T23:48:18Z info: Skipping Node layer creation
2024-02-27T23:48:18Z info: Pushing Repl layer...
2024-02-27T23:48:18Z info: Pushing hosting layer...
2024-02-27T23:48:18Z info: Retrieved cached nix layer
2024-02-27T23:48:18Z info: Created hosting layer
2024-02-27T23:48:20Z info: Created Repl layer
2024-02-27T23:48:20Z info: Pushed image manifest
2024-02-27T23:48:21Z info: Pushed soci index manifest
2024-02-27T23:48:27Z info: Creating Autoscale service
INFO:     Started server process [17]
starting up user application
INFO:     Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)
INFO:     Waiting for application startup.
INFO:     Application startup complete.
forwarding local port 8080 to external port 1104
2024-02-27T23:50:10Z error: The deployment failed to initialize due to a configuration or code error. Check the logs tab for more information. For additional support, please post on https://ask.replit.com/c/help/13 and a staff member will take a look.

Update: swapping uvicorn to start on port 8080 fixed this.

Honestly unsure on why though - https://replit.com/@eggmanDOTeth/defigirls-frame is operating under port 8000 as normal, and deployed without issue.

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