Supabase Local CLI, Database is not healthy
Describe the bug Supabase db pull works once but then fails on all subsequent pulls. Docker contain loads then goes away instantly (looking in the docker desktop ui)
To Reproduce Steps to reproduce the behavior:
- Supabase init
- supabase link
- supabase db pull
- supabase db pull --schema storage
Failed to remove container: a6e826a9a158f55c6fd8a62c2eda43f4f8806f3688f07b8cc7e24b1b366b55d4 Error response from daemon: No such container: a6e826a9a158f55c6fd8a62c2eda43f4f8806f3688f07b8cc7e24b1b366b55d4
database is not healthy
Also supabase start then gives:
Starting database...
Setting up initial schema...
error running container: exit 1
Expected behavior A clear and concise description of what you expected to happen.
System information
-
Ticket ID: 86bed0e795d44450a70db9d882eb6d00
-
Version of OS: Max os Sanoma 14.1.2
-
Version of CLI: 1.165.0
-
Version of Docker: 26.1.1
-
Versions of services:
supabase/postgres │ 15.1.0.32 │ 15.1.0.32 supabase/gotrue │ v2.150.1 │ v2.150.1 postgrest/postgrest │ v10.2.0 │ v10.2.0 supabase/realtime │ v2.28.32 │ - supabase/storage-api │ v1.2.1 │ v1.2.1 supabase/edge-runtime │ v1.45.2 │ - supabase/studio │ 20240422-5cf8f30 │ - supabase/postgres-meta │ v0.80.0 │ - supabase/logflare │ 1.4.0 │ - bitnami/pgbouncer │ 1.20.1-debian-11-r39 │ - darthsim/imgproxy │ v3.8.0 │ -
likely related to https://github.com/supabase/cli/issues/2250
can you check with the --debug flag?
I hit this when I upgraded the Supabase CLI. I'm guessing I didn't do a supabase stop --no-backup beforehand.
I was able to work around it be deleting the volumes with Docker:
docker volume ls # find the back-ups for your project
docker volume rm <volume name>
Figured out a command to delete just the Supabase Docker Images here: https://github.com/supabase/cli/issues/1415#issuecomment-2135605792
Yup, this is likely due to running outdated postgres image locally, ie. 15.1.0.32. I'd suggest upgrading your hosted project to latest version when possible.
Or as an alternative rm supabase/.temp/postgres-version to use the latest version locally.
tested with postgres image 15.1.1.61 and still encountering this error