# How to Monitor Heroku Uptime

> Heroku is a cloud platform that lets companies build, deliver, monitor, and scale apps. It's one of the earliest PaaS providers and remains popular for startups and small teams.

*Source: https://monitoristic.com/monitor/heroku*

---

## Why Monitor Heroku?

Heroku dynos restart every 24 hours, and free/eco dynos sleep after 30 minutes of inactivity. Even on paid plans, deployments cause brief restarts and routing layer issues can silently drop requests. If your app runs on Heroku, you need to know when those restarts cause real downtime.

## What to Monitor

- `your-app.herokuapp.com` — Your application's root URL or health endpoint
- `api.heroku.com` — Heroku Platform API for deployments and scaling
- `your-app.herokuapp.com/api/health` — Custom health check endpoint in your app

## What You Should Actually Do

1. Monitor your app's public URL externally — not through Heroku's own dashboard or logs, which can show green during routing failures
2. Add a /health endpoint to your app that checks database connectivity and returns a 200 — monitoring the root URL alone won't catch partial failures
3. Set up instant alerts via Telegram or webhook so you know about downtime before your customers email you
4. Create a status page — one link you can share with users when things go wrong instead of answering tickets individually
5. Track response times to catch slow dyno boots — if your app takes 10 seconds to respond after a restart, your users are waiting

## Heroku's Official Status Page

Heroku publishes real-time status at https://status.heroku.com. Your own monitor complements it by catching connection-level issues, often before the status page updates.

## Takeaway

Heroku abstracts away infrastructure, which is its strength. But abstraction cuts both ways — when something goes wrong in the routing layer, dyno scheduling, or cold boot process, you can't see it from the inside. External monitoring is the only way to see what your users actually experience.

## Frequently Asked Questions

### Does Heroku's daily dyno restart cause downtime?

Heroku restarts dynos every 24 hours. On well-configured apps with preboot enabled, this is seamless. Without preboot, there's a brief window where requests can fail. An external monitor catches these gaps.

### Can I monitor Heroku apps on eco dynos?

Yes — and you should. Eco dynos sleep after 30 minutes of inactivity. A monitor keeps your app awake and alerts you if wake-up times become unacceptable. Set your check interval to under 30 minutes to prevent sleeping.

### How do I detect Heroku routing layer issues?

Heroku's routing mesh can drop requests while dynos show as healthy. The only reliable way to detect this is external HTTP monitoring — checking your app's URL from outside Heroku's network.

### How is this different from status.heroku.com?

Heroku's status page reports platform-wide incidents. Your external monitor checks YOUR app specifically. Heroku can be globally healthy while your specific app has issues due to dyno scheduling, routing, or configuration.
