cli: 'supabase start' frequently fails with 'service not healthy'
Bug report
Describe the bug
Running supabase start on Github builders frequently fails with ‘service not healthy’.
To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
- Create a Github action workflow with
supabase/setup-cli@v1andversion: latest. - In the workflow start the supabase setup with
supabase start. - Optionally, for good measure, do this with 2 other supabase configurations (using different ports).
Expected behavior
The builder starts cleanly without errors.
Github action log
Run supabase start
supabase start
supabase status
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
Pulling images... (1/13)
Pulling images... (1/13)
Pulling images... (2/13)
Pulling images... (3/13)
Pulling images... (4/13)
Pulling images... (5/13)
Pulling images... (6/13)
Pulling images... (7/13)
Pulling images... (8/13)
Pulling images... (9/13)
Pulling images... (10/13)
Pulling images... (11/13)
Pulling images... (12/13)
Starting database...
Restoring branches...
Setting up initial schema...
Applying migration 20230105212858_initial.sql...
Seeding data supabase/seed.sql...
Starting containers...
Error: service not healthy: [supabase_storage_supabase_test supabase_pg_meta_supabase_test supabase_studio_supabase_test]
Try rerunning the command with --debug to troubleshoot the error.
Error: Process completed with exit code 1.
Unfortunately, I wasn’t able to get a better log with --debug. With the debug flag, the action didn’t exhibit the problem.
System information
Github builder, ubuntu-latest (22.04). See https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources
Additional context
Older versions don’t show the error.
This was most likely introduced by the “fix” to https://github.com/supabase/cli/issues/146 https://github.com/supabase/cli/pull/770
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 3
- Comments: 36 (10 by maintainers)
Commits related to this issue
- Ignore health check. Sometimes the health-checks for starting supabase aren't succeeding. https://github.com/supabase/cli/issues/778 In many cases the tests still run fine. — committed to toitware/artemis by floitsch 4 years ago
- Ignore health check. (#210) Sometimes the health-checks for starting supabase aren't succeeding. https://github.com/supabase/cli/issues/778 In many cases the tests still run fine. — committed to toitware/artemis by floitsch 4 years ago
Just ran it on an 8GB RAM linode, and it started fine with no errors, I guess it is my machine’s limited resources. Running the start command with
--ignore-health-checkfixes it for me, I will keep using that. Thanks.I can increase the wait time from 10s to 20s and see how it goes. You can also exclude services from starting if they are not needed, for eg.
If you are testing migrations only, just the database needs to be started
supabase db startI’m experiencing this issue with the
supabase_studio_container. I’ve tried all the solutions other people have found across the similar issues (destroying and redownloading images/containers, increasing memory resources, and ignoring health checks). It seems none of this is working as the container is stuck in a restart loop.There isn’t anything in the container logs to help:
(The warning is there on my other setup which is working)
This is what I get when I run supabase start (it logs the same log as above before as well):
Docker Engine: v24.0.2 Supabase CLI: v1.77.9 OS: macOS 13.4 Node: v18.16.1
I’ve tried on a brand new supabase project and an existing project with the same results.
@xHergz @Nnanyielugo Did you ever figure this out? Having the same issue.
All container are healhy now, but here is their
docker logs supabase_studio_*docker logs supabase_pg_meta_*docker logs storage_imgproxy_*docker logs supabase_storage_*docker logs supabase_rest_*docker logs realtime-dev.supabase_realtime_*docker logs supabase_inbucket_*docker logs supabase_auth_*docker logs supabase_kong_*docker logs supabase_db_*@bllchmbrs @HendrikRunte
If you do not need to use Supabase Studio, (I just needed to test/deploy edge functions so this worked fine for me) you can run
supabase startwith the --exclude/-x flag to exclude its startup to avoid this error. E.g.,supabase start -x studioshould get things running, though you won’t have access to the local studio gui.Thanks for the detailed description. It seems like realtime doesn’t support running docker in rootless mode yet. I will ping someone to have a closer look.
You have to update your CLI version, the version am using is 1.34.5
when I run “supabase start --help” I get this: Start containers for Supabase local development
Usage: supabase start [flags]
Flags: -x, --exclude strings Names of containers to not start. [gotrue, realtime, storage-api, imgproxy, kong, inbucket, postgrest, pgadmin-schema-diff, migra, postgres-meta, studio, deno-relay] -h, --help help for start
Global Flags: –debug output debug logs to stderr –experimental enable experimental features –workdir string path to a Supabase project directory
This is with supabase CLI version 1.33.0
Running
supabase start --ignore-health-checkworks, but these services are still unhealthydocker psshows the container from imagepublic.ecr.aws/supabase/studio:20221214-4eecc99as unhealthy, but after a few minutes, it was healthy. What can I do to help pinpoint the problem?Am experiencing a similar error, albeit on my local machine
System info
When I run
docker pswhilesupabase startis running, it shows that container from imagepublic.ecr.aws/supabase/storage-api:v0.26.1is unhealthy. The actual error aftersupabase startexits isExtra information
This is my first time running supabase locally.
(EDIT) I have tried this on a fresh Ubuntu linode and gotten a similar error