Skip to content
>_VibeUnstuck

Failed to fetch: Supabase project paused

Last verified:

The fix

Failed to fetch with Supabase status 540 means the project is paused. Restore it in the dashboard and wait. An empty URL is a different error.

  1. 1

    Read the status page before you change code

    Open https://status.supabase.com. If the app uses Lovable's hosted backend, also open https://status.lovable.dev. If either page lists an incident for the service you call, stop. Another prompt will not revive a paused or down API, and it will edit the app while you cannot test it.

  2. 2

    See whether a project you own is paused

    In the Supabase dashboard, select the organization, then the project. If it is paused, click Resume project and confirm. That restore is available for 1 year after the pause. A Lovable Cloud backend is not in this list. The identifying guide says Lovable owns that instance. Wait for status.lovable.dev. Do not create a second Supabase project and paste its URL over the Cloud app to "replace" the one that is down.

  3. 3

    Match the URL in the app to that project

    The request host should be that project's URL, the https://<project-ref>.supabase.co host from Settings, then API. A project change, a branch, or an old build leaves the previous host in the client. If the console says supabaseUrl is required or Invalid API key, use those pages. This page is the request that never gets a normal API body back.

  4. 4

    Read the status code, then retry one login and one query

    In the browser Network tab, open the failing call to the Supabase host. 540 means paused. Another 5xx means the project or the platform failed the call. When the status page is clear and the project is resumed, sign in once and run one read. If that returns relation does not exist or a row-level security error, stop and use that page. Do not keep prompting while the status code is still 540 or 5xx.

Why it happens

When the API host does not answer, the browser reports Failed to fetch, and a server-side client reports a connection error such as ECONNREFUSED. Supabase's HTTP status guide uses 540 for a paused project: the project cannot process requests until the owner un-pauses it. Other 5xx codes mean the project failed while handling the request. 402 is different again. It is a fair-use restriction, and the dashboard still opens. The status guide does not list 521, so a 521 in the Network tab is not a documented Supabase project code. Do not treat it as an RLS bug.

The free-plan pausing guide says Supabase pauses Free Plan projects that do not receive sufficient user database activity over the past week. It says a few user requests to the database each day over the previous week is typically enough to keep a project from being paused. The owner gets a warning email about a week before the pause, then a confirmation email. Projects on a paid plan are not paused for inactivity. You can restore a paused project for up to 1 year: open the dashboard, select the organization, select the paused project, click Resume project, and confirm. Lovable Cloud is not that dashboard. Supabase's own note says a Lovable Cloud project does not appear in your Supabase dashboard, and you do not get its database URL. People also paste "Error loading RLS policies" while a Lovable backend is down. That sentence is not a documented Supabase error code. Do not rewrite policies, and do not spend another AI turn on the client, until the status page is clear and the project answers.

The next error you'll probably hit

Once this is fixed, the usual follow-up is Invalid API key. Invalid API key. Supabase received a key this project does not accept. Copy the publishable key, or the legacy anon key, from the same project as the URL. No API key found in request means the header was missing.

Prompt to paste back into your AI tool

Paste this above the error.

The app cannot log in or load data. The browser shows Failed to fetch, or the client shows ECONNREFUSED, or the Supabase host returns 540 or another 5xx. The host in the request is <host>.

Do not disable RLS. Do not rewrite policies. Do not put a service role key in NEXT_PUBLIC_ or VITE_. Do not swallow the error in an empty catch. Do not keep editing the client while the status page shows an incident.

1. Tell me to open https://status.supabase.com and, if this is Lovable Cloud, https://status.lovable.dev. If there is an incident, stop.
2. If I own the Supabase project, tell me to open that project and click Resume project if it is paused. Quote the free-plan rule only as documented: insufficient user database activity over the past week, restore within 1 year. If this is Lovable Cloud, say the project is not in my Supabase dashboard.
3. Compare the request host with the project URL. Do not swap in a different project.
4. After it answers, test one sign-in and one query. If the body is then a missing relation or an RLS error, name that and stop.
5. Do not change application code unless the URL in the bundle is the wrong project.

Common questions

+The project worked last month and nobody changed the code. What happened?

A Free Plan project can be paused when it does not get enough user database activity over the past week. Paid-plan projects are not paused for inactivity. Check the dashboard for Resume project, and check the status page before you treat it as a bad client.

+I see Error loading RLS policies in Lovable. Should I regenerate the policies?

Not while the backend is unreachable. That sentence is not a documented Supabase error code. A paused project returns 540 and cannot process requests. Wait until the project answers, then read the real error body.

Related errors