Skip to content

Monitoring & logs

View app logs, build logs and metrics

Read runtime logs from staging or live, full build logs for every deploy, and CPU, memory and uptime charts for your app in the DployHub dashboard.

Updated 3 min read

When something looks wrong, logs and metrics are the first place to look. Each app on DployHub has three tabs for this: Logs for what your running app prints, Deployments for build output, and Metrics for CPU, memory and uptime.

Runtime logs

The Logs tab shows what your app has printed to stdout and stderr. Choose staging or live, and load the most recent lines on demand: 200 by default, up to 1000.

Anything your app prints to the console appears here, so log to stdout and stderr rather than to files:

js
console.log('order created', orderId);
console.error('payment webhook failed', err);
python
import logging, sys
logging.basicConfig(stream=sys.stdout, level=logging.INFO)
logging.info("order created %s", order_id)

Build logs

The Deployments tab lists every deploy with who triggered it, the commit, how long it took and whether it succeeded. Open one to see its full build log. Logs stream live while a build is running.

If a release fails to start, the deploy is marked failed and shows the last 50 log lines from your app along with a plain message, such as:

text
Your app didn't answer on port 3000 within 90 seconds. Make sure it listens on 0.0.0.0 and uses the PORT environment variable (PORT=3000), or change the port in the app settings.

See Build failed and App not answering for what each message means.

Metrics

The Metrics tab shows charts of CPU usage in percent and memory usage in MB, plus uptime as a percentage. The default range is the last 24 hours and you can look back up to 90 days.

  • Memory climbing towards your limit means you are at risk of an out-of-memory crash. Add memory or look for a leak. See App crashed: out of memory.
  • CPU close to 100% for long periods with slow responses means you need more vCPU. See Choose resources.
  • Dips in uptime line up with crashes or restarts. Check the Logs tab around that time.

Log retention

Runtime logs are rotated at 10 MB, keeping 3 files, so very chatty apps keep less history. Logs from before a deploy belong to the old container. If you need long-term log history, send logs to an external logging service from your app as well.

Get told instead of checking

Rather than watching these tabs, set up alerts for failed deploys and downtime. If you need help reading a log, raise a ticket and attach the app and deployment. We include the app status, error summary and last 30 log lines automatically.

Frequently asked questions

How many log lines can I see?

The Logs tab loads the latest 200 lines by default and up to 1000, for staging or live.

How far back do metrics go?

Metrics show the last 24 hours by default and up to 90 days.

Why are my logs empty?

Make sure your app prints to stdout or stderr rather than to a file. For Python, set PYTHONUNBUFFERED to 1.