Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

supabase-db container crashes on init, local stack fails to start #2141

Open
knksmith57 opened this issue Apr 11, 2024 · 4 comments
Open

supabase-db container crashes on init, local stack fails to start #2141

knksmith57 opened this issue Apr 11, 2024 · 4 comments

Comments

@knksmith57
Copy link

Describe the bug
This just started happening after a fresh CLI install. I'm not positive the last time I updated it, but it hasn't been more than a month or so.

Standing up the local stack with a completely clean daemon (no volumes, no networks, no containers) crashes after the postgresql container is created but before everything else comes up. I'm able to grab log output from the db container and it seems like the thing just dies with no apparent explanation.

CLI logs (end of tail):

2024/04/11 20:44:14 Connect Start: tcp 127.0.0.1:54322
2024/04/11 20:44:14 Connect Error: tcp 127.0.0.1:54322 dial tcp 127.0.0.1:54322: connect: connection refused
2024/04/11 20:44:14 Connect Start: tcp 127.0.0.1:54322
2024/04/11 20:44:14 Connect Error: tcp 127.0.0.1:54322 dial tcp 127.0.0.1:54322: connect: connection refused
Pruned containers: [8d7fe47c05b3a26d4250bec6cbc9416075f297d2cd55e5698c0321880eb749bf bdef0074ee7509c95b3b220a0b52775ab9a0fc72fc880f497f058cb98aec4e73]
Pruned volumes: [supabase_db_playground supabase_config_playground]
Pruned network: [supabase_network_playground]
failed to connect to postgres: failed to connect to `host=127.0.0.1 user=postgres database=postgres`: dial error (dial tcp 127.0.0.1:54322: connect: connection refused)
Sent crash report: 42be6c774de241e6851a55e4134d84ab
Quote the crash ID above when filing a bug report: https://github.com/supabase/cli/issues/new/choose

db container logs:

❯ docker logs -f supabase_db_playground
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.

The database cluster will be initialized with this locale configuration:
  provider:    libc
  LC_COLLATE:  C.UTF-8
  LC_CTYPE:    C.UTF-8
  LC_MESSAGES: en_US.UTF-8
  LC_MONETARY: en_US.UTF-8
  LC_NUMERIC:  en_US.UTF-8
  LC_TIME:     en_US.UTF-8
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".

Data page checksums are disabled.

fixing permissions on existing directory /var/lib/postgresql/data ... ok
creating subdirectories ... ok
selecting dynamic shared memory implementation ... posix
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting default time zone ... Etc/UTC
creating configuration files ... ok
running bootstrap script ... ok
performing post-bootstrap initialization ... ok
syncing data to disk ... ok


Success. You can now start the database server using:

    pg_ctl -D /var/lib/postgresql/data -l logfile start

initdb: warning: enabling "trust" authentication for local connections
initdb: hint: You can change this by editing pg_hba.conf or using the option -A, or --auth-local and --auth-host, the next time you run initdb.
waiting for server to start.... 2024-04-11 20:44:04.383 UTC [53] LOG:  pgaudit extension initialized
 2024-04-11 20:44:04.388 UTC [53] LOG:  pgsodium primary server secret key loaded
 2024-04-11 20:44:04.456 UTC [53] LOG:  starting PostgreSQL 15.1 (Ubuntu 15.1-1.pgdg20.04+1) on aarch64-unknown-linux-gnu, compiled by gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0, 64-bit
 2024-04-11 20:44:04.458 UTC [53] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
 2024-04-11 20:44:04.461 UTC [59] LOG:  database system was shut down at 2024-04-11 20:44:04 UTC
 2024-04-11 20:44:04.464 UTC [62] LOG:  TimescaleDB background worker launcher connected to shared catalogs
 2024-04-11 20:44:04.464 UTC [53] LOG:  database system is ready to accept connections
 2024-04-11 20:44:04.467 UTC [64] LOG:  pg_cron scheduler started
 done
server started

/usr/local/bin/docker-entrypoint.sh: ignoring /docker-entrypoint-initdb.d/init-scripts

/usr/local/bin/docker-entrypoint.sh: running /docker-entrypoint-initdb.d/migrate.sh
/docker-entrypoint-initdb.d/migrate.sh: running /docker-entrypoint-initdb.d/init-scripts/00-schema.sql
CREATE ROLE
REVOKE
CREATE SCHEMA
CREATE FUNCTION
REVOKE
GRANT
/docker-entrypoint-initdb.d/migrate.sh: running /docker-entrypoint-initdb.d/init-scripts/00000000000000-initial-schema.sql
CREATE PUBLICATION
CREATE ROLE
ALTER ROLE
CREATE ROLE
CREATE ROLE
GRANT ROLE
CREATE SCHEMA
CREATE EXTENSION
CREATE EXTENSION
CREATE EXTENSION
CREATE ROLE
CREATE ROLE
CREATE ROLE
CREATE ROLE
GRANT ROLE
GRANT ROLE
GRANT ROLE
GRANT ROLE
GRANT
ALTER DEFAULT PRIVILEGES
ALTER DEFAULT PRIVILEGES
ALTER DEFAULT PRIVILEGES
GRANT
ALTER ROLE
ALTER DEFAULT PRIVILEGES
ALTER DEFAULT PRIVILEGES
ALTER DEFAULT PRIVILEGES
ALTER ROLE
ALTER ROLE
/docker-entrypoint-initdb.d/migrate.sh: running /docker-entrypoint-initdb.d/init-scripts/00000000000001-auth-schema.sql
CREATE SCHEMA
CREATE TABLE
CREATE INDEX
CREATE INDEX
COMMENT
CREATE TABLE
CREATE INDEX
CREATE INDEX
CREATE INDEX
COMMENT
CREATE TABLE
COMMENT
CREATE TABLE
CREATE INDEX
COMMENT
CREATE TABLE
COMMENT
INSERT 0 7
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
GRANT
CREATE ROLE
GRANT
GRANT
GRANT
ALTER ROLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
/docker-entrypoint-initdb.d/migrate.sh: running /docker-entrypoint-initdb.d/init-scripts/00000000000002-storage-schema.sql
CREATE SCHEMA
GRANT
ALTER DEFAULT PRIVILEGES
ALTER DEFAULT PRIVILEGES
ALTER DEFAULT PRIVILEGES
CREATE TABLE
CREATE INDEX
CREATE TABLE
CREATE INDEX
CREATE INDEX
ALTER TABLE
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE TABLE
CREATE ROLE
GRANT
GRANT
GRANT
ALTER ROLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER FUNCTION
ALTER FUNCTION
ALTER FUNCTION
ALTER FUNCTION
/docker-entrypoint-initdb.d/migrate.sh: running /docker-entrypoint-initdb.d/init-scripts/00000000000003-post-setup.sql
ALTER ROLE
ALTER ROLE
CREATE FUNCTION
CREATE EVENT TRIGGER
COMMENT
CREATE FUNCTION
COMMENT
DO
CREATE ROLE
GRANT
GRANT
GRANT
GRANT
GRANT
GRANT
GRANT
GRANT
GRANT
GRANT
GRANT
GRANT
ALTER ROLE
/docker-entrypoint-initdb.d/migrate.sh: running /docker-entrypoint-initdb.d/migrations/00-extension.sql
psql:/docker-entrypoint-initdb.d/migrations/00-extension.sql:1: NOTICE:  schema "extensions" already exists, skipping
CREATE SCHEMA
CREATE EXTENSION
/docker-entrypoint-initdb.d/migrate.sh: running /docker-entrypoint-initdb.d/migrations/10000000000000_demote-postgres.sql
GRANT
GRANT
GRANT
GRANT
GRANT
GRANT
GRANT
GRANT
GRANT
GRANT
GRANT
GRANT
GRANT
ALTER ROLE
/docker-entrypoint-initdb.d/migrate.sh: running /docker-entrypoint-initdb.d/migrations/20211115181400_update-auth-permissions.sql
GRANT
GRANT
GRANT
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
ALTER TABLE
GRANT
GRANT
GRANT
GRANT
ALTER DEFAULT PRIVILEGES
ALTER DEFAULT PRIVILEGES
ALTER DEFAULT PRIVILEGES
/docker-entrypoint-initdb.d/migrate.sh: running /docker-entrypoint-initdb.d/migrations/20211118015519_create-realtime-schema.sql
CREATE SCHEMA
/docker-entrypoint-initdb.d/migrate.sh: running /docker-entrypoint-initdb.d/migrations/20211122051245_update-realtime-permissions.sql
GRANT
GRANT
GRANT
GRANT
/docker-entrypoint-initdb.d/migrate.sh: running /docker-entrypoint-initdb.d/migrations/20211124212715_update-auth-owner.sql
ALTER FUNCTION
ALTER FUNCTION
ALTER FUNCTION
/docker-entrypoint-initdb.d/migrate.sh: running /docker-entrypoint-initdb.d/migrations/20211130151719_update-realtime-permissions.sql
ALTER DEFAULT PRIVILEGES
ALTER DEFAULT PRIVILEGES
ALTER DEFAULT PRIVILEGES
/docker-entrypoint-initdb.d/migrate.sh: running /docker-entrypoint-initdb.d/migrations/20220118070449_enable-safeupdate-postgrest.sql
ALTER ROLE
/docker-entrypoint-initdb.d/migrate.sh: running /docker-entrypoint-initdb.d/migrations/20220126121436_finer-postgrest-triggers.sql
psql:/docker-entrypoint-initdb.d/migrations/20220126121436_finer-postgrest-triggers.sql:3: NOTICE:  event trigger "api_restart" does not exist, skipping
DROP EVENT TRIGGER
psql:/docker-entrypoint-initdb.d/migrations/20220126121436_finer-postgrest-triggers.sql:4: NOTICE:  function extensions.notify_api_restart() does not exist, skipping
DROP FUNCTION
CREATE FUNCTION
CREATE FUNCTION
psql:/docker-entrypoint-initdb.d/migrations/20220126121436_finer-postgrest-triggers.sql:59: NOTICE:  event trigger "pgrst_ddl_watch" does not exist, skipping
DROP EVENT TRIGGER
CREATE EVENT TRIGGER
psql:/docker-entrypoint-initdb.d/migrations/20220126121436_finer-postgrest-triggers.sql:64: NOTICE:  event trigger "pgrst_drop_watch" does not exist, skipping
DROP EVENT TRIGGER
CREATE EVENT TRIGGER
/docker-entrypoint-initdb.d/migrate.sh: running /docker-entrypoint-initdb.d/migrations/20220224211803_fix-postgrest-supautils.sql
DO
/docker-entrypoint-initdb.d/migrate.sh: running /docker-entrypoint-initdb.d/migrations/20220317095840_pg_graphql.sql
CREATE SCHEMA
psql:/docker-entrypoint-initdb.d/migrations/20220317095840_pg_graphql.sql:5: NOTICE:  function graphql_public.graphql(text,text,jsonb) does not exist, skipping
DROP FUNCTION
CREATE FUNCTION
GRANT
ALTER DEFAULT PRIVILEGES
ALTER DEFAULT PRIVILEGES
ALTER DEFAULT PRIVILEGES
ALTER DEFAULT PRIVILEGES
ALTER DEFAULT PRIVILEGES
ALTER DEFAULT PRIVILEGES
CREATE FUNCTION
psql:/docker-entrypoint-initdb.d/migrations/20220317095840_pg_graphql.sql:90: NOTICE:  event trigger "issue_pg_graphql_access" does not exist, skipping
DROP EVENT TRIGGER
CREATE EVENT TRIGGER
COMMENT
CREATE FUNCTION
psql:/docker-entrypoint-initdb.d/migrations/20220317095840_pg_graphql.sql:143: NOTICE:  event trigger "issue_graphql_placeholder" does not exist, skipping
DROP EVENT TRIGGER
CREATE EVENT TRIGGER
COMMENT
/docker-entrypoint-initdb.d/migrate.sh: running /docker-entrypoint-initdb.d/migrations/20220321174452_fix-postgrest-alter-type-event-trigger.sql
psql:/docker-entrypoint-initdb.d/migrations/20220321174452_fix-postgrest-alter-type-event-trigger.sql:3: NOTICE:  event trigger "api_restart" does not exist, skipping
DROP EVENT TRIGGER
psql:/docker-entrypoint-initdb.d/migrations/20220321174452_fix-postgrest-alter-type-event-trigger.sql:4: NOTICE:  function extensions.notify_api_restart() does not exist, skipping
DROP FUNCTION
CREATE FUNCTION
CREATE FUNCTION
DROP EVENT TRIGGER
CREATE EVENT TRIGGER
DROP EVENT TRIGGER
CREATE EVENT TRIGGER
/docker-entrypoint-initdb.d/migrate.sh: running /docker-entrypoint-initdb.d/migrations/20220322085208_gotrue-session-limit.sql
ALTER ROLE
/docker-entrypoint-initdb.d/migrate.sh: running /docker-entrypoint-initdb.d/migrations/20220404205710_pg_graphql-on-by-default.sql
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
psql:/docker-entrypoint-initdb.d/migrations/20220404205710_pg_graphql-on-by-default.sql:142: NOTICE:  extension "pg_graphql" does not exist, skipping
DROP EXTENSION
DO
/docker-entrypoint-initdb.d/migrate.sh: running /docker-entrypoint-initdb.d/migrations/20220609081115_grant-supabase-auth-admin-and-supabase-storage-admin-to-postgres.sql
GRANT ROLE
/docker-entrypoint-initdb.d/migrate.sh: running /docker-entrypoint-initdb.d/migrations/20220613123923_pg_graphql-pg-dump-perms.sql
CREATE FUNCTION
DROP EXTENSION
DO
/docker-entrypoint-initdb.d/migrate.sh: running /docker-entrypoint-initdb.d/migrations/20220713082019_pg_cron-pg_net-temp-perms-fix.sql
DO
DO
/docker-entrypoint-initdb.d/migrate.sh: running /docker-entrypoint-initdb.d/migrations/20221028101028_set_authenticator_timeout.sql
ALTER ROLE
/docker-entrypoint-initdb.d/migrate.sh: running /docker-entrypoint-initdb.d/migrations/20221103090837_revoke_admin.sql
REVOKE ROLE
/docker-entrypoint-initdb.d/migrate.sh: running /docker-entrypoint-initdb.d/migrations/20221207154255_create_pgsodium_and_vault.sql
DO
/docker-entrypoint-initdb.d/migrate.sh: running /docker-entrypoint-initdb.d/migrations/20230201083204_grant_auth_roles_to_postgres.sql
GRANT ROLE
/docker-entrypoint-initdb.d/migrate.sh: running /docker-entrypoint-initdb.d/migrations/20230224042246_grant_extensions_perms_for_postgres.sql
GRANT
GRANT
GRANT
ALTER DEFAULT PRIVILEGES
ALTER DEFAULT PRIVILEGES
ALTER DEFAULT PRIVILEGES
/docker-entrypoint-initdb.d/migrate.sh: running /docker-entrypoint-initdb.d/migrations/20230306081037_grant_pg_monitor_to_postgres.sql
GRANT ROLE
/docker-entrypoint-initdb.d/migrate.sh: running /docker-entrypoint-initdb.d/migrations/20230327032006_grant_auth_roles_to_supabase_storage_admin.sql
GRANT ROLE
/docker-entrypoint-initdb.d/migrate.sh: running /docker-entrypoint-initdb.d/migrations/20230529180330_alter_api_roles_for_inherit.sql
ALTER ROLE
ALTER ROLE
ALTER ROLE
GRANT ROLE
/docker-entrypoint-initdb.d/migrate.sh: running /docker-entrypoint-initdb.d/migrations/20231013070755_grant_authenticator_to_supabase_storage_admin.sql
GRANT ROLE
REVOKE ROLE
/docker-entrypoint-initdb.d/migrate.sh: running /docker-entrypoint-initdb.d/migrations/20231017062225_grant_pg_graphql_permissions_for_custom_roles.sql
CREATE FUNCTION
DROP EXTENSION
DO
/docker-entrypoint-initdb.d/migrate.sh: running /docker-entrypoint-initdb.d/migrations/20231020085357_revoke_writes_on_cron_job_from_postgres.sql
DO
CREATE FUNCTION
DROP EVENT TRIGGER
CREATE EVENT TRIGGER
/docker-entrypoint-initdb.d/migrate.sh: running /docker-entrypoint-initdb.d/migrations/20231130133139_set_lock_timeout_to_authenticator_role.sql
ALTER ROLE
/docker-entrypoint-initdb.d/migrate.sh: running /etc/postgresql.schema.sql
ALTER DATABASE
ALTER DATABASE
ALTER ROLE
ALTER ROLE
ALTER ROLE
ALTER ROLE
ALTER ROLE
ALTER ROLE
CREATE SCHEMA
ALTER SCHEMA
CREATE SCHEMA
ALTER SCHEMA
BEGIN
CREATE EXTENSION
CREATE SCHEMA
GRANT
ALTER DEFAULT PRIVILEGES
ALTER DEFAULT PRIVILEGES
ALTER DEFAULT PRIVILEGES
CREATE TABLE
INSERT 0 1
CREATE TABLE
CREATE INDEX
CREATE INDEX
COMMENT
CREATE FUNCTION
DO
GRANT
GRANT
GRANT
ALTER ROLE
ALTER TABLE
ALTER TABLE
ALTER FUNCTION
GRANT ROLE
DO
DO
CREATE FUNCTION
COMMENT
DO
INSERT 0 1
ALTER FUNCTION
ALTER FUNCTION
REVOKE
GRANT
COMMIT
 pg_stat_statements_reset 
--------------------------
 
(1 row)

 pg_stat_reset 
---------------
 
(1 row)


/usr/local/bin/docker-entrypoint.sh: ignoring /docker-entrypoint-initdb.d/migrations

waiting for server to shut down... 2024-04-11 20:44:05.500 UTC [53] LOG:  received fast shutdown request
. 2024-04-11 20:44:05.500 UTC [53] LOG:  aborting any active transactions
 2024-04-11 20:44:05.500 UTC [64] LOG:  pg_cron scheduler shutting down
 2024-04-11 20:44:05.500 UTC [62] FATAL:  terminating background worker "TimescaleDB Background Worker Launcher" due to administrator command
 2024-04-11 20:44:05.504 UTC [53] LOG:  background worker "TimescaleDB Background Worker Launcher" (PID 62) exited with exit code 1
 2024-04-11 20:44:05.504 UTC [53] LOG:  background worker "logical replication launcher" (PID 65) exited with exit code 1
 2024-04-11 20:44:05.505 UTC [57] LOG:  shutting down
 2024-04-11 20:44:05.506 UTC [57] LOG:  checkpoint starting: shutdown immediate
 2024-04-11 20:44:05.525 UTC [57] LOG:  checkpoint complete: wrote 361 buffers (2.2%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.006 s, sync=0.012 s, total=0.020 s; sync files=124, longest=0.007 s, average=0.001 s; distance=2974 kB, estimate=2974 kB
 2024-04-11 20:44:05.532 UTC [53] LOG:  database system is shut down
 done
server stopped

PostgreSQL init process complete; ready for start up.

 2024-04-11 20:44:05.619 UTC [10] LOG:  pgaudit extension initialized
 2024-04-11 20:44:05.626 UTC [10] LOG:  pgsodium primary server secret key loaded
 2024-04-11 20:44:05.651 UTC [10] LOG:  starting PostgreSQL 15.1 (Ubuntu 15.1-1.pgdg20.04+1) on aarch64-unknown-linux-gnu, compiled by gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0, 64-bit
 2024-04-11 20:44:05.651 UTC [10] LOG:  listening on IPv4 address "0.0.0.0", port 5432
 2024-04-11 20:44:05.651 UTC [10] LOG:  listening on IPv6 address "::", port 5432
 2024-04-11 20:44:05.652 UTC [10] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
 2024-04-11 20:44:05.655 UTC [157] LOG:  database system was shut down at 2024-04-11 20:44:05 UTC
 2024-04-11 20:44:05.657 UTC [10] LOG:  database system is ready to accept connections
 2024-04-11 20:44:05.657 UTC [160] LOG:  TimescaleDB background worker launcher connected to shared catalogs
 2024-04-11 20:44:05.659 UTC [162] LOG:  pg_cron scheduler started

To Reproduce
Steps to reproduce the behavior:

  1. supabase --debug start --ignore-health-check --create-ticket

Note: I'm running the supabase CLI from within a dind container (have been successfully for months now) as part of a Docker Compose stack.

Here's the Dockerfile:

FROM docker:24-dind AS supabase-cli

WORKDIR /app
RUN apk add --no-cache nodejs npm \
    && npm install supabase

ENV PATH=/app/node_modules/.bin:${PATH}
ENTRYPOINT ["supabase"]
CMD ["start", "--ignore-health-check"]

Here's the Docker Compose service definition:

services:
  supabase-cli:
    command:
      - --debug
      - start
      - --ignore-health-check
    build:
      target: supabase-cli
      context: .
    environment:
      - SUPABASE_ACCESS_TOKEN
    develop:
      watch:
        - action: rebuild
          path: ./packages/supabase/config.toml
    working_dir: ${PWD}/packages/supabase
    volumes:
      - ./packages/supabase:${PWD}/packages/supabase
      - "/var/run/docker.sock:/var/run/docker.sock"

Here's the canned config.toml I'm mounting/using:

# A string used to distinguish different Supabase projects on the same host. Defaults to the
# working directory name when running `supabase init`.
project_id = "playground"

[api]
enabled = true
# Port to use for the API URL.
port = 54321
# Schemas to expose in your API. Tables, views and stored procedures in this schema will get API
# endpoints. public and storage are always included.
schemas = ["public", "storage", "graphql_public"]
# Extra schemas to add to the search_path of every request. public is always included.
extra_search_path = ["public", "extensions"]
# The maximum number of rows returns from a view, table, or stored procedure. Limits payload size
# for accidental or malicious requests.
max_rows = 1000

[functions.check_user_session]
verify_jwt = false

[db]
# Port to use for the local database URL.
port = 54322
# Port used by db diff command to initialize the shadow database.
shadow_port = 54320
# The database major version to use. This has to be the same as your remote database's. Run `SHOW
# server_version;` on the remote database to check.
major_version = 15

[db.pooler]
enabled = false
# Port to use for the local connection pooler.
port = 54329
# Specifies when a server connection can be reused by other clients.
# Configure one of the supported pooler modes: `transaction`, `session`.
pool_mode = "transaction"
# How many server connections to allow per user/database pair.
default_pool_size = 20
# Maximum number of client connections allowed.
max_client_conn = 100

[realtime]
enabled = true
# Bind realtime via either IPv4 or IPv6. (default: IPv6)
# ip_version = "IPv6"
# The maximum length in bytes of HTTP request headers. (default: 4096)
# max_header_length = 4096

[studio]
enabled = true
# Port to use for Supabase Studio.
port = 54323
# External URL of the API server that frontend connects to.
api_url = "http://127.0.0.1"

# Email testing server. Emails sent with the local dev setup are not actually sent - rather, they
# are monitored, and you can view the emails that would have been sent from the web interface.
[inbucket]
enabled = true
# Port to use for the email testing server web interface.
port = 54324
# Uncomment to expose additional ports for testing user applications that send emails.
# smtp_port = 54325
# pop3_port = 54326

[storage]
enabled = true
# The maximum file size allowed (e.g. "5MB", "500KB").
file_size_limit = "50MiB"

[auth]
enabled = true
# The base URL of your website. Used as an allow-list for redirects and for constructing URLs used
# in emails.
site_url = "http://127.0.0.1:3000"
# A list of *exact* URLs that auth providers are permitted to redirect to post authentication.
additional_redirect_urls = ["https://127.0.0.1:3000"]
# How long tokens are valid for, in seconds. Defaults to 3600 (1 hour), maximum 604,800 (1 week).
jwt_expiry = 3600
# If disabled, the refresh token will never expire.
enable_refresh_token_rotation = true
# Allows refresh tokens to be reused after expiry, up to the specified interval in seconds.
# Requires enable_refresh_token_rotation = true.
refresh_token_reuse_interval = 10
# Allow/disallow new user signups to your project.
enable_signup = true
# Allow/disallow testing manual linking of accounts
enable_manual_linking = false

[auth.email]
# Allow/disallow new user signups via email to your project.
enable_signup = true
# If enabled, a user will be required to confirm any email change on both the old, and new email
# addresses. If disabled, only the new email is required to confirm.
double_confirm_changes = true
# If enabled, users need to confirm their email address before signing in.
enable_confirmations = false

# Uncomment to customize email template
# [auth.email.template.invite]
# subject = "You have been invited"
# content_path = "./supabase/templates/invite.html"

[auth.sms]
# Allow/disallow new user signups via SMS to your project.
enable_signup = true
# If enabled, users need to confirm their phone number before signing in.
enable_confirmations = false
# Template for sending OTP to users
template = "Your code is {{ .Code }} ."

# Use pre-defined map of phone number to OTP for testing.
[auth.sms.test_otp]
# 4152127777 = "123456"

# This hook runs before a token is issued and allows you to add additional claims based on the authentication method used.
[auth.hook.custom_access_token]
# enabled = true
# uri = "pg-functions://<database>/<schema>/<hook_name>"

# Configure one of the supported SMS providers: `twilio`, `twilio_verify`, `messagebird`, `textlocal`, `vonage`.
[auth.sms.twilio]
enabled = false
account_sid = ""
message_service_sid = ""
# DO NOT commit your Twilio auth token to git. Use environment variable substitution instead:
auth_token = "env(SUPABASE_AUTH_SMS_TWILIO_AUTH_TOKEN)"

# Use an external OAuth provider. The full list of providers are: `apple`, `azure`, `bitbucket`,
# `discord`, `facebook`, `github`, `gitlab`, `google`, `keycloak`, `linkedin_oidc`, `notion`, `twitch`,
# `twitter`, `slack`, `spotify`, `workos`, `zoom`.
[auth.external.apple]
enabled = false
client_id = ""
# DO NOT commit your OAuth provider secret to git. Use environment variable substitution instead:
secret = "env(SUPABASE_AUTH_EXTERNAL_APPLE_SECRET)"
# Overrides the default auth redirectUrl.
redirect_uri = ""
# Overrides the default auth provider URL. Used to support self-hosted gitlab, single-tenant Azure,
# or any other third-party OIDC providers.
url = ""

[analytics]
enabled = true
port = 54327
vector_port = 54328
# Configure one of the supported backends: `postgres`, `bigquery`.
backend = "postgres"

Expected behavior
I expect the local stack to come up, including (especially) the postgresql database

Screenshots
N/A

System information

  • Ticket ID: 42be6c774de241e6851a55e4134d84ab
  • Version of CLI: 1.153.1
  • Version of Docker: 25.0.3 (via Docker Desktop 4.28.0 (139021))
  • Versions of services:
    Service Local Linked
    supabase/postgres 15.1.0.147 -
    supabase/gotrue v2.143.0 -
    postgrest/postgrest v12.0.1 -
    supabase/realtime v2.27.5 -
    supabase/storage-api v0.46.4 -
    supabase/edge-runtime v1.41.2 -
    supabase/studio 20240326-5e5586d -
    supabase/postgres-meta v0.80.0 -
    supabase/logflare 1.4.0 -
    bitnami/pgbouncer 1.20.1-debian-11-r39 -
    darthsim/imgproxy v3.8.0 -

Additional context
If applicable, add any other context about the problem here.

  • Version of Node.js: v20.11.1.
@knksmith57
Copy link
Author

knksmith57 commented Apr 11, 2024

Could be related to supabase/supabase#22518

@knksmith57
Copy link
Author

Also potentially related to #2146

@sweatybridge
Copy link
Contributor

Since the logs were cutoff, I suspect it's due to db health check taking longer than the max timeout of 2 minutes. Could you verify on docker settings page that enough resources is allocated?

Screenshot 2024-04-15 at 1 49 21 PM

@knksmith57
Copy link
Author

Hm, that's interesting. 2 data points for color there:

  1. It's failing much sooner than 120 seconds (I can clock it if that's useful but it's more in the ballpark of 45 seconds)
  2. On my M2 Mac I'm allocating 8 CPU, 12GB memory, and 2GB swap. I can crank resource allocation up, but given I already have 150% of your screenshot, it feels unnecessary. Please let me know!
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants