Heroku application monitoring showing dyno uptime, cold start detection and availability alerts
# web development

How to Monitor Heroku Applications for Uptime and Reliability

Heroku remains a popular platform for deploying web applications, APIs, and services — especially for startups and smaller teams who value simplicity over infrastructure complexity. But Heroku's architecture introduces specific monitoring considerations that don't apply to traditional servers.

Heroku-Specific Uptime Challenges

Dyno Sleeping (Free and Eco Dynos)

Free and Eco tier dynos "sleep" after 30 minutes of inactivity. When a request arrives to wake a sleeping dyno, it takes 20-30 seconds to respond — which looks like a timeout to most monitoring tools and to users.

If you're on a sleeping dyno plan, either:

  1. Accept that your site will sometimes appear "down" to monitoring checks during wake-up periods
  2. Upgrade to a Basic dyno (which doesn't sleep) for production applications

Standard dyno plans and above don't sleep and behave more like traditional servers.

Daily Dyno Restarts

Heroku restarts all dynos approximately once every 24 hours. These restarts are intentional but cause brief downtime — typically 1-3 seconds. Your uptime monitor will likely catch at least one of these per day.

Configure your monitor to require 2-3 consecutive failures before alerting to avoid false alarms from daily restart events.

Deploy Downtime

By default, deploying a new version to Heroku causes a brief period where the old dynos are stopped and new ones are starting. Using Heroku's preboot feature (available on paid plans) eliminates most deploy downtime by starting new dynos before stopping old ones.

Step 1: Add a Health Endpoint

Every Heroku application should expose a health endpoint. This endpoint should:

  • Respond quickly (under 500ms)
  • Check database connectivity if your app uses a database
  • Return 200 OK when healthy, 503 when degraded
# Django example (also see how-to-monitor-django-applications)
def health(request):
    try:
        from django.db import connections
        connections['default'].cursor()
        return JsonResponse({"status": "ok"})
    except Exception:
        return JsonResponse({"status": "error"}, status=503)
// Node.js/Express example
app.get('/health', async (req, res) => {
  try {
    await db.query('SELECT 1');
    res.json({ status: 'ok' });
  } catch (err) {
    res.status(503).json({ status: 'error' });
  }
});

Step 2: Configure External HTTP Monitoring

Point an external uptime monitor at your health endpoint:

  • URL: https://yourapp.herokuapp.com/health or your custom domain
  • Method: GET
  • Interval: 1 minute
  • Confirmation count: 3 consecutive failures (to filter out restart blips)
  • Expected response: 200 OK

This provides continuous external verification that your Heroku app is accessible and its dependencies are working.

Step 3: Monitor Heroku Scheduler Jobs

Heroku Scheduler is a free add-on for running periodic tasks. Like any cron system, scheduler jobs can fail silently. Use heartbeat monitoring to confirm your scheduled jobs run successfully:

# At the end of your scheduled job
import requests
requests.get(os.environ.get('HEARTBEAT_URL'))

Add the heartbeat URL as a Heroku config var (heroku config:set HEARTBEAT_URL=...).

Step 4: Monitor Worker Dynos

If you have worker dynos running background jobs (Celery, Sidekiq, custom workers), these need separate monitoring from your web dynos. Workers don't expose HTTP endpoints, so use heartbeat monitoring:

  • Create a recurring task in your worker that pings a heartbeat monitor URL
  • If the worker process dies, the heartbeat stops and you receive an alert

Step 5: Monitor Custom Domain SSL

If your Heroku app uses a custom domain, Heroku provisions an SSL certificate automatically via ACM (Automated Certificate Management). However, certificate renewal can fail if:

  • Your DNS records are misconfigured
  • Your domain verification lapses
  • ACM encounters an issue

SSL certificate monitoring catches these failures before they affect users.

Heroku Add-on Monitoring

Heroku applications often depend on add-ons — Heroku Postgres, Heroku Redis, SendGrid, Cloudinary. These add-ons can have their own outages. While you can't directly monitor third-party add-ons, your health endpoint should check that connections to critical add-ons (especially the database) are functioning.

Response Time Monitoring on Heroku

Heroku add metrics to their dashboards for response time and throughput, but external response time monitoring gives you the user's perspective — including DNS resolution time and network latency that Heroku's internal metrics don't capture.

Configure response time thresholds in your uptime monitor — for Heroku applications, be aware that:

  • Eco/Basic dynos will have a spike after a restart
  • Database query time affects TTFB — see what is time to first byte for more detail

Monitoring Setup for Heroku Apps

MonitorCheckIntervalNotes
Web health endpointHTTP uptime1 min3-failure confirmation
Worker heartbeatHeartbeat5 minSet in Heroku Scheduler
SSL certificateSSL monitoringDailyFor custom domains
Domain expiryDomain monitoringWeeklyVia registrar WHOIS

Domain Monitor provides all of these monitoring types in a single dashboard, making it straightforward to set up comprehensive Heroku application monitoring.


Monitor your Heroku application at Domain Monitor.

More posts

What Is Generative AI? How It Works and What It Creates

Generative AI creates new content — text, images, code, and more. This guide explains how it works, what tools are available, and where it's genuinely useful versus overhyped.

Read more
What Is Cursor AI? The AI Code Editor Explained

Cursor AI is an AI-powered code editor built on VS Code. Learn what it does, how it works, and whether it's the right tool for your development workflow.

Read more
What Is Claude Opus? Anthropic's Most Powerful Model Explained

Claude Opus is Anthropic's most capable AI model, built for complex reasoning and demanding tasks. Learn what it does, how it compares, and when to use it.

Read more

Subscribe to our PRO plan.

Looking to monitor your website and domains? Join our platform and start today.