Fix guides

Supabase Free project read-only or down with a full disk (25006, 53100 No space left on device, PANIC crash loop)

Writes fail with "cannot execute INSERT in a read-only transaction", or the whole database is down with "No space left on device" and PANIC in the logs. Why a small database can still fill the 2 GB Free disk, how to get writes back, and what to do if Postgres is already down.

Free · no card

Paste your error. Get a free diagnosis by email.

Tell us what broke and we’ll email you a short diagnosis: the likely cause and what to try first. Usually within a day.

No passwords or secret keys, please. We only use your email to reply about this.

What you are seeing

Why it happens

  1. Free plan projects have a fixed 2 GB disk that does not autoscale. At 95% disk usage Supabase puts the database into read-only mode, and turns it off again automatically once usage drops below 95%.
  2. Disk is not the same as database size. The disk also holds the write-ahead log (WAL) and system files. WAL grows fast during heavy writes and can pass the default max_wal_size of 1 GB before old files are removed, so a 2 GB disk can fill while the data itself is small. An unused replication slot can also hold back WAL.
  3. Deleting rows does not free space by itself. Postgres only reclaims it after a vacuum, so a cleanup that deletes data without vacuuming can leave the disk just as full.
  4. Read-only mode is best effort. Writes already in progress and WAL can keep filling the disk after it starts. If the disk becomes completely full, Postgres shuts down. Supabase's docs say it then stays down until the project is upgraded to Pro and restarted.
  5. The 500 MB database-size quota is a separate billing limit. It does not trigger read-only mode; going over it on average can instead put the organization under a Fair Use restriction that returns 402.

How to fix it

1. Find out which case you are in

Read-only (Postgres up, writes fail with 25006): continue with steps 2 to 5; you can usually recover on the Free plan. Down (53100, PANIC, 57P03, 503 / PGRST002 on every request): go to step 6; you cannot delete data while Postgres is down. To confirm, use the Logs Explorer with the source set to Postgres logs and filter for sql_state_code 25006, 53100, and 57P03 (the exact query is on Supabase's database-size page linked below).

2. Back up before you touch anything

# reads still work in read-only mode, so a dump works
supabase db dump --remote -f backup-schema.sql
supabase db dump --remote --data-only -f backup-data.sql
# CLI v2 used --linked or --db-url instead of --remote
# or: pg_dump "$DIRECT_CONNECTION_STRING" > backup.sql

3. See what is using the disk

-- total database size
select pg_size_pretty(sum(pg_database_size(datname))) from pg_database;

-- WAL on disk
select pg_size_pretty(sum(size)) as wal_size from pg_ls_waldir();

-- replication slots holding WAL (inactive ones are suspects)
select slot_name, active from pg_replication_slots;

-- biggest tables, including indexes and TOAST
select relname, pg_size_pretty(pg_total_relation_size(relid)) as total
from pg_catalog.pg_statio_user_tables
order by pg_total_relation_size(relid) desc limit 15;

-- Infrastructure page also splits disk into Database, WAL and System

4. Get write access for this session and free space

-- only this SQL Editor session can write
set session characteristics as transaction read write;

-- drop a replication slot you do not use (e.g. left by a sync tool)
select pg_drop_replication_slot('unused_slot_name');

-- delete what you do not need (old logs, events, job rows), in batches
delete from app_events where created_at < now() - interval '30 days';

-- then reclaim the space
vacuum;
-- vacuum full locks the table; use it only on a table you can lock briefly
-- vacuum full app_events;

5. Stop it filling up again

Read-only mode lifts automatically once disk usage is under 95%. Then remove the cause: batch big imports and updates into smaller chunks, slow down or delete cron jobs that write every minute (check pg_cron jobs and Edge Function schedules the AI created), store files in Storage instead of base64 in table columns, and drop unused indexes. Keep disk usage well below 95%; the margin between read-only and a full disk is small.

6. If Postgres is already down from a full disk

Supabase's docs give one supported path: upgrade the organization to Pro, then General settings > Restart project, then wait about 10 minutes. Pro has an 8 GB disk that autoscales. If you cannot upgrade, open a support ticket from the dashboard with the project ref, the time it went down, and the exact log lines (No space left on device, PANIC). Ask them to preserve the data. Do not pause, restore, or delete the project while you wait. After it is back, take a backup first, then do steps 3 to 5 so it does not happen again.

How to know it is fixed

An INSERT from the app succeeds, the Postgres logs show no new 25006, 53100, or 57P03 entries, and the Infrastructure page shows the disk well under 95% after the next daily metrics update. Check again a day later: if WAL or one table is climbing, the cause is still running. Sources: Supabase: Understanding database and disk size (Free plan behavior, read-only mode, WAL, vacuum), Supabase discussion #53803 (Free project down from disk exhaustion, Nov 22, 2026), and issue #53440 (disk-full recovery loop on a mostly idle Free project). Related: Supabase project Unhealthy or stuck hibernated and Supabase Free plan quota exceeded.