Uptimy
All Articles
Infrastructure··7 min read

How to Monitor a Supabase App: Uptime, Cron Jobs and Paused Projects

Supabase has reports and logs but no downtime alerts, and pg_cron failures sit in a table. How to get alerted on outages, failed jobs and paused projects.

✅

Short answer

  • Outages: Supabase has reports and logs, but its docs describe no alerting when your project stops answering. Add an external check on an endpoint that queries the database through your app.
  • Cron jobs: Supabase Cron records every run in cron.job_run_details and tells no one when a job fails. End each job with a heartbeat ping sent with pg_net.
  • Paused projects: Free projects pause after a week of low activity. That's fine for a side project and a surprise for anything people rely on.

Supabase is often the whole backend: database, auth, storage, functions and scheduled jobs. When part of it fails, your frontend can look fine while every request behind it errors. Here's what Supabase shows you, what it doesn't, and the small amount of monitoring that closes the gap.

What Supabase gives you

  • Reports for the database, auth, storage, realtime, API and Edge Functions. On the Free plan they cover up to the last 24 hours; longer ranges need Pro or Team.
  • Logs, kept for 1 day on Free, 7 days on Pro and 28 on Team, according to the pricing page.
  • A Prometheus metrics endpoint per project (in beta), which the metrics docs suggest scraping once a minute and building your own alerting on. The pricing page lists it for paid plans.

All of that is for looking at a problem. None of it, in Supabase's docs, pages you when the project stops answering or a job stops running. You either build alerting on the metrics endpoint or check from outside.

Outages: check through your app

Your users don't talk to Supabase directly, they talk to your app, which talks to Supabase. So check the same path: a small health route that runs one cheap query and returns what it found.

app/api/health/route.ts
import { createClient } from "@supabase/supabase-js";

const supabase = createClient(
  process.env.SUPABASE_URL!,
  process.env.SUPABASE_ANON_KEY!,
);

export async function GET() {
  // One cheap read from a small public table.
  const { error } = await supabase.from("plans").select("id").limit(1);
  if (error) {
    return Response.json({ db: "error" }, { status: 503 });
  }
  return Response.json({ db: "ok" });
}

Point an HTTP check at it, expect status 200 and the keyword "db":"ok", and check from more than one region. A Supabase incident, an exhausted connection pool, a paused project or a broken deploy of your own all fail this check the same way, and you can tell them apart from the Supabase status page.

💡

Sign-in is worth its own check

Auth can be degraded while the database is fine. If logins are what your product can't live without, a browser check that actually signs in a test user catches what the health route doesn't.

Cron jobs: a heartbeat from inside Postgres

Supabase Cron is pg_cron. Every run and its status lands in cron.job_run_details, a table that isn't cleaned up automatically and that nobody watches. A failed nightly cleanup is a row with status = 'failed' until someone looks.

Instead, have each job report success. The pg_net extension makes HTTP requests from SQL, and it only sends them once the transaction commits. Put the job and the ping in one function: if the job raises an error, the transaction rolls back and no ping is sent.

SQL editor
create or replace function public.nightly_cleanup()
returns void
language plpgsql
as $$
begin
  delete from public.events
  where created_at < now() - interval '90 days';

  -- Sent only if everything above succeeded and the transaction commits.
  perform net.http_get('https://ping.upti.my/<your-token>');
end;
$$;

select cron.schedule('nightly-cleanup', '17 3 * * *', 'select public.nightly_cleanup()');

In Uptimy, give the heartbeat a Cron schedule of 17 3 * * * in UTC and a grace period a little longer than the job takes. A failed run, a job someone unscheduled, or a project that paused all end the same way: no ping, one alert.

Edge Functions: know the limits

Scheduled work often lives in an Edge Function called from cron. Supabase's function limits are tight for batch work: 2 seconds of CPU time, 256 MB of memory, and a wall-clock limit of 150 seconds on Free and 400 seconds on paid plans. A job that grows past them gets cut off mid-run.

The heartbeat pattern works here too: ping at the end of the function, after the work, so a function that times out never pings.

supabase/functions/daily-digest/index.ts
Deno.serve(async () => {
  await sendDailyDigest();

  // Only reached if the work above finished.
  await fetch(Deno.env.get("UPTIMY_HEARTBEAT_URL")!);
  return new Response("ok");
});

Paused projects on the Free plan

Supabase pauses Free projects that show low database activity over 7 days. The owner gets an email about a week before and another when it happens, and a paused project can be restored from the dashboard for up to a year. Paid projects are never paused.

Supabase's docs count requests to your project as activity, so a project under a regular uptime check is less likely to look idle. Don't rely on that for anything customers use: a production app belongs on a paid plan, where pausing doesn't apply, and the check is there to tell you when it's down for any reason.

Where the alerts go

A failed health check means users are affected now; a missed cleanup job can wait for the morning. Alert routing sends each to the right place, and a failing public check can update your status page so users know you're on it.

📌Key Takeaways

  • 1Supabase's reports, logs and metrics are for investigating; its docs describe no downtime alerts
  • 2Check a health route in your app that runs one real query, with a keyword assertion, from several regions
  • 3Supabase Cron records failures in cron.job_run_details and tells no one
  • 4Send a heartbeat with pg_net at the end of each job: it only goes out when the transaction commits
  • 5Edge Functions stop at 2s of CPU and 150s (Free) or 400s (paid) wall clock; ping after the work
  • 6Free projects pause after a week of low activity; production belongs on a paid plan

23:00 · goodnight

All systems operational

Stop wondering if production is okay.

Tonight, if something breaks, you will know first — with the context to fix it and a status page that keeps customers informed. And if nothing breaks, you get to sleep.

Free plan available · No credit card required · Cancel anytime