--- title: start_failed description: Your app built, but did not start answering on its port within 4 minutes. --- # `start_failed` **Severity:** error. Your app built, but did not start answering on its port within 4 minutes. ## What happened The build passed, but when Kaviris started the app it did not answer on its contract's port within 4 minutes, and it listens on no other port (that would be [port_mismatch](port_mismatch.md)). It crashed, or it waits for something it never gets. ## How to fix it - **Listen on `PORT`**, the port Kaviris gives your app in that environment variable (`process.env.PORT`, `os.environ["PORT"]`), on all interfaces (`0.0.0.0`), not only `localhost`/`127.0.0.1`. - **Check required secrets.** An app that exits when `OPENAI_API_KEY` is missing will fail here: declare and set the secret first. - **Check the database connection.** Use `DATABASE_URL`, which Kaviris sets when your contract has a database. - Read the log tail in the refusal, and `kaviris logs`. Fix and deploy again. [All refusal codes](index.md)