cli: `supabase start` Error: service not healthy

Bug report

  • I confirm this is a bug with Supabase, not with my own application.
  • I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug

supabase start fails after updating to the latest version.

To Reproduce

supabase start

Logs

supabase start --debug logs:

[...]
supabase_pg_meta_limey container logs:

> @supabase/postgres-meta@0.0.0-automated start
> node dist/server/app.js

(node:36) ExperimentalWarning: Importing JSON modules is an experimental feature. This feature could change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
2023/05/09 23:57:31 Sent Header: Host [docker]
2023/05/09 23:57:31 Sent Header: User-Agent [Go-http-client/1.1]
2023/05/09 23:57:31 Send Done
2023/05/09 23:57:31 Recv First Byte
supabase_studio_limey container logs:
info  - Loaded env from /app/studio/.env
Listening on port 3000
Error: service not healthy: [realtime-dev.supabase_realtime_limey supabase_pg_meta_limey supabase_studio_limey]

System information

  • OS: macOS 13.3.1
  • RAM allocated to Docker: 12 GB

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Reactions: 5
  • Comments: 28 (5 by maintainers)

Most upvoted comments

Found the upstream issue for this segfault https://github.com/docker/for-mac/issues/6824. If you are on Intel Mac with docker desktop versions >= 4.19.0, the workaround is to disable MacOS Virtualization Framework.

Screenshot 2023-08-24 at 6 32 48 PM

Closing this issue as unrelated to CLI.

UPDATE: I managed to reproduce this error after upgrading docker desktop to 4.21.1 (docker engine 24.0.1). I was previously on 4.12.0 (engine 20.10.17).

I will dig through their changelog to see if there’s any fixes.

UPDATE 2: The last known working version is 4.18.0

As a workaround downgrading to 1.69.0 worked for me. There’s probably a more up-to-date version which also works. With the latest version I’m experiencing exactly the same issue as @munkacsimark on my mac.

I did a binary search between 1.69.0 and 1.88.0 and found that 1.72.0 works, and 1.73.0 no longer does. So 1.72.0 is the most recent version that does not exhibit this problem. Something broke between 1.72.0 and 1.73.0.

yarn remove supabase
yarn add supabase@1.72.0 --save-dev
yarn run supabase stop
yarn run supabase start

As a workaround downgrading to 1.69.0 worked for me. There’s probably a more up-to-date version which also works. With the latest version I’m experiencing exactly the same issue as @munkacsimark on my mac.

Actually I still have this error, even on the latest version 1.88.0

I have similar issue, every container is starting correctly except supabase_studio_xxxxx. The container keeps restarting then I’m getting the service not healthy error. --ignore-health-check flag works but this way I cannot start the studio locally. This log entry is repeating in the container:

info  - Loaded env from /app/studio/.env
Listening on port 3000
No storage option exists to persist the session, which may result in unexpected behavior when using auth.
        If you want to set persistSession to true, please provide a storage option or you may set persistSession to false to disable this warning.

Any suggestion for this issue?

Thanks! This is really helpful. There studio version changed in 1.73.0 from 20230605 to 20230622 so there should be some commits between these dates that caused the crash loop on studio.

I destroy all my docker container & images, and now it works.

I have the issue :

$ npx supabase start        
supabase_rest_my-app container logs:
12/Jun/2023:14:09:05 +0000: Attempting to connect to the database...
12/Jun/2023:14:09:05 +0000: Connection successful
12/Jun/2023:14:09:05 +0000: Listening on port 3000
12/Jun/2023:14:09:05 +0000: Config reloaded
12/Jun/2023:14:09:05 +0000: Listening for notifications on the pgrst channel
12/Jun/2023:14:09:05 +0000: Schema cache loaded
12/Jun/2023:14:09:05 +0000: Attempting to connect to the database...
12/Jun/2023:14:09:05 +0000: Connection successful
12/Jun/2023:14:09:05 +0000: Config reloaded
12/Jun/2023:14:09:05 +0000: Schema cache loaded
12/Jun/2023:14:09:07 +0000: Attempting to connect to the database...
12/Jun/2023:14:09:07 +0000: Connection successful
12/Jun/2023:14:09:07 +0000: Config reloaded
12/Jun/2023:14:09:07 +0000: Schema cache loaded
12/Jun/2023:14:09:07 +0000: Attempting to connect to the database...
12/Jun/2023:14:09:07 +0000: Connection successful
12/Jun/2023:14:09:07 +0000: Config reloaded
12/Jun/2023:14:09:07 +0000: Schema cache loaded
12/Jun/2023:14:09:07 +0000: Attempting to connect to the database...
12/Jun/2023:14:09:07 +0000: Connection successful
12/Jun/2023:14:09:07 +0000: Config reloaded
12/Jun/2023:14:09:07 +0000: Schema cache loaded
supabase_deno_relay_my-app container logs:
Download https://deno.land/std@0.182.0/http/server.ts
Download https://deno.land/x/jose@v4.13.1/index.ts
Download https://deno.land/x/jose@v4.13.1/jwe/compact/decrypt.ts
[...]
Download https://deno.land/x/jose@v4.13.1/util/base64url.ts
Download https://deno.land/std@0.182.0/async/mod.ts
Download https://deno.land/x/jose@v4.13.1/lib/buffer_utils.ts
[...]
Download https://deno.land/x/jose@v4.13.1/runtime/generate.ts
Download https://deno.land/std@0.182.0/async/abortable.ts
[...]
Download https://deno.land/std@0.182.0/async/retry.ts
Download https://deno.land/x/jose@v4.13.1/lib/check_iv_length.ts
Download https://deno.land/x/jose@v4.13.1/runtime/check_cek_length.ts
Download https://deno.land/x/jose@v4.13.1/runtime/timing_safe_equal.ts
[...]
Download https://deno.land/x/jose@v4.13.1/lib/check_p2s.ts
Serving functions on http://localhost:54321/functions/v1/<function-name>
Error: service not healthy: [supabase_rest_my-app supabase_deno_relay_my-app]
Try rerunning the command with --debug to troubleshoot the error.

Debug bring no useful information and the flag --ignore-health-check allows me to finish supabase start, but then I can’t query my db from my nextjs app without getting the error : An invalid response was received from the upstream server.

I am sure that I have enough ram (32gb). I tried to restart every container or delete and reinstall them but nothing work. Impossible to use the supabase cli… Anyone to help me ?