Read App Logs and Diagnose Failed Startup

Who this is for

Users whose app has failed to start, is crashing, or is behaving unexpectedly, and who need to read the container logs to diagnose the problem.


How to View App Logs

  1. Open the app detail.
  2. Click the Logs tab.
  3. The last 200 lines of container output are displayed by default.
  4. Use the Tail dropdown to change the number of lines (1–500).

For compose apps, logs from all services are shown together.


What the Logs Show

The logs tab shows container stdout and stderr output. This is equivalent to running:

docker logs --tail 200 <container-name>

For compose apps:

docker compose logs --tail 200

Common Log Patterns and What They Mean

App is running and healthy

Server listening on port 3000
Connected to database

Normal output. App is up.

Port binding failure

Error: listen EADDRINUSE: address already in use :::3000

The port the app is trying to listen on is already in use inside the container, or the host port is conflicting with another process. Check the port mapping configuration.

Missing environment variable

Error: DATABASE_URL is not defined
TypeError: Cannot read property 'host' of undefined

A required environment variable is missing. Check the Environment tab.

Database connection failure

Error connecting to database: connection refused

The database is not running, or the connection string is wrong. For compose apps, ensure the database service is healthy and the hostname matches the service name.

Out of memory

Killed

Container was killed by the OOM (out of memory) killer. Increase the memory limit in app settings.

Image pull failure (at deploy time, shown in Activity Center)

Unable to find image 'myimage:v2' locally
Error response from daemon: manifest for myimage:v2 not found

The image tag does not exist on the registry. Verify the image reference.


Exit Code Meanings

The logs response includes an exitCode field:

Exit codeMeaning
nullContainer is still running
0Container exited cleanly (intentional stop or job completion)
1Generic error — check logs for details
137Killed by OS (usually OOM — out of memory)
139Segmentation fault
143Terminated by SIGTERM (graceful shutdown)

What to Do If App Keeps Crashing

  1. Read the last 200 lines of logs — look for the error before "exiting".
  2. Check environment variables are all set correctly.
  3. Verify the Docker image exists and is accessible.
  4. Try running the image with a shell to debug interactively:
  • SSH into the server via the Terminal tab.
  • Run: docker run -it --rm /bin/sh
  1. Increase the memory limit if you suspect OOM.
  2. Set restartPolicy: no to prevent the container from restarting while you debug.

What Success Looks Like

Logs show normal startup output without errors. App status is running. The healthcheck endpoint returns 200 OK.


Common Issues and Fixes

IssueLikely causeFix
"SERVER_NOT_READY" errorSSH is downCheck server SSH status.
Logs show no outputApp outputs nothing to stdoutSome apps log to file only. SSH in and check /var/log/ or the app's log directory.
Compose logs mixed and hard to readMultiple servicesFilter by service name in the search. Or SSH in and run docker compose logs .

Related Articles