🔧 Unbreak My AppAll fixesError codesFix KitsSponsor

Fixes › Database / Supabase RLS

Supabase project paused: app suddenly can't connect (Failed to fetch, 540) and how to bring it back

LovableBoltCursorReplitv0

Published

The error

Your Lovable, Bolt or Cursor app worked last week and now nothing loads: login spins forever, lists are empty, the console says 'TypeError: Failed to fetch' (or 'fetch failed', ENOTFOUND or ECONNREFUSED from server code), the Network tab shows status 540 from your *.supabase.co URL, and you have an email from Supabase saying your project was paused

Why it happens

Supabase pauses projects on the Free plan when they get too little database activity over a 7-day period. Side projects, demos and apps you built and then stopped testing are the usual victims: no visitors means no queries, so after about a week the project is paused. Supabase emails the project owner a warning roughly a week before and a confirmation when it happens, but those emails often go to an inbox you don't check or to the account your AI builder used to create the project. While a project is paused it cannot process any request, and the platform answers with the custom status code 540 (project paused), so the browser just reports a failed fetch and the app looks broken. Nothing in your code changed, so asking the AI builder to fix it only makes it rewrite working code. Your data and settings are kept: a paused project can be resumed from the dashboard for up to 1 year after it was paused (Supabase used to allow 90 days; the current docs say 1 year). After that window the Resume option is gone and you have to download the backup and Storage files and move them to a new project. Paid plans (Pro and above) are never paused for inactivity.

How to fix it

  1. Confirm it is a pause, not a code bug. Open the browser dev tools, go to Network, reload, and click a failing request to your https://<ref>.supabase.co URL. Status 540 means the project is paused. Also search your email (including spam) for a message from Supabase about pausing, and check status.supabase.com for a wider outage.
  2. Stop prompting the AI builder. Do not let it change the Supabase URL, keys or queries while the project is paused; the code is fine and every rewrite is a new bug to undo later.
  3. Resume the project: Supabase Dashboard → select the organization → select the paused project → Resume project, then confirm. Wait until the project shows as healthy (usually a few minutes), then reload your app.
  4. If Resume is blocked because you already have 2 active Free projects, pause one you don't need first (paused projects don't count toward the 2-project limit), or move this project to a paid organization.
  5. Make sure the app points at the project you just resumed: compare the project URL and anon or publishable key in your app's environment variables (Lovable, Bolt, Vercel, Netlify or .env) with Settings → API in the dashboard. Builders sometimes create a second project, so you may have resumed the wrong one.
  6. Test the basics once: sign in, load one list, save one row. If you now get 'relation does not exist', 'permission denied' or an RLS error, that is a different problem with its own fix, not the pause.
  7. If the app uses Lovable Cloud (the backend Lovable manages for you) rather than your own Supabase account, you won't find it in your Supabase dashboard. Check Lovable's status page and contact Lovable support instead of creating a new Supabase project.
  8. If the project was paused more than 1 year ago and there is no Resume button: in the paused project's dashboard, download the database backup and every Storage bucket's files, create a new project, restore the backup with psql using the Session pooler connection string, copy the Storage files back (supabase storage cp), then update the URL and keys in your app and redeploy. Re-add Edge Function secrets, auth redirect URLs, SMTP and OAuth settings by hand.
  9. Stop it happening again. If real people use the app, upgrade the organization to a paid plan, since paid projects are never paused for inactivity. For a free demo, open the project in the dashboard when you get the warning email, or run a small scheduled job (for example a free GitHub Actions cron) that makes a real read query a few times a day. Supabase says a few requests a day is typically enough, but not guaranteed.
  10. Make sure the pause emails reach you: check which email owns the Supabase organization (Organization settings → Team) and add yourself as Owner if your AI builder created it under another account.

Fix prompt (paste into Lovable, Bolt, Cursor, Replit or v0)

My app's Supabase project was paused for inactivity and I have just resumed it in the Supabase dashboard. Do not rewrite any queries, auth code or database schema. Do only this: 1) Show me where the app reads the Supabase URL and anon or publishable key (env variables and the client setup file) and print the project ref it uses, so I can check it matches the project I resumed. 2) If any code hard-codes a Supabase URL or key, move it into environment variables. 3) Add a friendly error message for failed Supabase requests (network failure or status 540) that says 'The service is temporarily unavailable, please try again in a minute' instead of a blank screen or endless spinner. 4) Optionally, add a GitHub Actions workflow on a schedule (a few times a day) that makes one small read query against a public table using the anon key stored as a GitHub secret, so the free project gets regular activity. Then list anything I still need to set by hand in the Supabase dashboard.

Error codes this fixes

FAQ

How long until a free Supabase project pauses?

Supabase pauses Free plan projects that show too little database activity over a 7-day period. You get a warning email roughly a week before the pause and a confirmation email when it happens.

Will I lose my data when the project is paused?

No. A paused project keeps its data and settings, and you can resume it from the dashboard for up to 1 year after it was paused. After that you can still download the database backup and Storage files and restore them into a new project.

Is it 90 days or 1 year to restore?

In 2024 Supabase limited restores to 90 days. The current Supabase docs say a paused project can be restored for up to 1 year. If your project is older than that, use the backup download and restore route.

Can a keep-alive ping stop the pause?

Supabase counts real API calls and dashboard visits as activity, and says a few requests a day is typically enough, but it is not guaranteed. If customers depend on the app, the reliable fix is a paid plan, because paid projects are never paused for inactivity.

Why does my AI builder say the Supabase code is broken?

It only sees failed requests. The code is fine; the database is switched off. Resume the project first, then only fix what still fails afterwards.

Sources

Based on the official documentation:

Related fixes

Want the full checklist for this area? Get a Fix Kit ($29)

Get one new fix a week

Free newsletter: the newest breakages in Lovable, Bolt, Cursor, Replit and v0 apps, with paste-in fixes.

We only use your email to send the newsletter. Unsubscribe any time. See privacy.