> For the complete documentation index, see [llms.txt](https://docs.lingoql.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.lingoql.com/introduction/troubleshooting-deploys/runtime-and-startup-failures.md).

# Runtime and startup failures

A runtime failure means the build passed, but the app did not stay up.

On LingoQL, a failed rollout does not replace a healthy deploy.

### App exits immediately

Your start process must keep running.

If the command finishes, the deploy stops.

Common causes:

* running a migration instead of the server
* using a dev command that exits in production
* starting a script that never launches the app

### Port binding issues

Your app must listen on the port provided by `PORT`.

LingoQL also injects `HOST`.

Use `HOST` and `PORT` when your framework supports both values.

If your framework needs a literal host, bind to `0.0.0.0`.

These patterns fail in production:

* hardcoding `3000`
* binding to `127.0.0.1`
* binding to `localhost`

### Missing environment variables

A build can pass even when runtime secrets are missing.

Check every value the app needs to boot:

* database connection strings
* API keys and secret keys
* app base URLs and callback URLs

If the app crashes before serving traffic, missing env vars are one of the first things to check.

### Slow boot or failed health checks

Your app must become healthy after startup.

Long blocking tasks during boot can make the deploy look dead.

Move non-essential work out of the boot path when possible.

Examples include:

* large data syncs
* expensive warmup work
* long migrations

### Database and service connection errors

If the app starts locally but crashes in production, check outbound service dependencies next.

Confirm:

* the connection string is valid
* SSL settings match the provider requirements
* the target service accepts connections from your app

Many managed TCP services on LingoQL require TLS on `443` and SNI set to the service hostname.

Redis-compatible services also require a `rediss://` connection string or explicit TLS enablement in the client.

If the client supports a TLS `servername`, set it to the exact host from your service URL.

Make startup failures log the real exception.

A clear startup error is easier to fix than a silent retry loop.

Use [Services you can deploy](/introduction/services-you-can-deploy.md) for working connection examples for Redis, immudb, Neo4j, ScyllaDB, RabbitMQ, ClickHouse, and Memcached.

### Resource pressure

If the app boots, then crashes under load, it may need more memory or CPU.

Common signs include repeated restarts, timeouts, or out-of-memory errors.

Reduce memory usage in the app first.

If needed, increase the resources assigned to the deploy.

### Quick recovery checklist

1. Confirm the start command launches the server.
2. Confirm the app binds to `HOST:$PORT` or `0.0.0.0:$PORT`.
3. Recheck every required env var.
4. Review the first runtime error in logs.
5. Increase resources if the process is being killed.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.lingoql.com/introduction/troubleshooting-deploys/runtime-and-startup-failures.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
