Skip to content

"error running container: exit 1" when restoring database backups in local development #3530

@nilsreichardt

Description

@nilsreichardt

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

When I execute supabase db start --from-backup db_cluster.backup, I get the following error:

$ supabase db start --from-backup db_cluster-04-05-2025\@01-08-27.backup --debug
Supabase CLI 2.22.6
Starting database...
+ ulimit -n
+ '[' '!' -z '' ']'
+ export ERL_CRASH_DUMP=/tmp/erl_crash.dump
+ ERL_CRASH_DUMP=/tmp/erl_crash.dump
+ '[' false = true ']'
+ echo 'Running migrations'
+ sudo -E -u nobody /app/bin/migrate
** (DBConnection.ConnectionError) connection not available and request was dropped from queue after 14991ms. This means requests are coming in and your connection pool cannot serve them fast enough. You can address this by:

  1. Ensuring your database is available and that you can connect to it
  2. Tracking down slow queries and making sure they are running fast enough
  3. Increasing the pool_size (although this increases resource consumption)
  4. Allowing requests to wait longer by increasing :queue_target and :queue_interval

See DBConnection.start_link/2 for more information

    (ecto_sql 3.11.3) lib/ecto/adapters/sql.ex:1054: Ecto.Adapters.SQL.raise_sql_call_error/1
    (elixir 1.17.3) lib/enum.ex:1703: Enum."-map/2-lists^map/1-1-"/2
    (ecto_sql 3.11.3) lib/ecto/adapters/sql.ex:1161: Ecto.Adapters.SQL.execute_ddl/4
    (ecto_sql 3.11.3) lib/ecto/migrator.ex:755: Ecto.Migrator.verbose_schema_migration/3
    (ecto_sql 3.11.3) lib/ecto/migrator.ex:563: Ecto.Migrator.lock_for_migrations/4
    (ecto_sql 3.11.3) lib/ecto/migrator.ex:432: Ecto.Migrator.run/4
    (ecto_sql 3.11.3) lib/ecto/migrator.ex:170: Ecto.Migrator.with_repo/3
    nofile:1: (file)
Stopping containers...
Pruned containers: [24e7384f9c3dc72e7b7c02e3af4e2f3fa83d88cba9f41b36b0e38f2e85ab77bf]
Pruned volumes: [supabase_db_temp-supabase supabase_config_temp-supabase]
Pruned network: [supabase_network_temp-supabase]
error running container: exit 1

To Reproduce

  1. Download a backup from hosted Supabase backup
  2. Unzip the backup
  3. Follow steps from https://supabase.com/docs/guides/local-development/restoring-downloaded-backup#restoring-your-backup
  4. See error
supabase-backup.mp4

Expected behavior

No errors.

Screenshots

Image

System information

  • OS: macOS
  • Version of Supabase CLI: 2.22.6
  • Postgres version: 15.6.1.115

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions