cli icon indicating copy to clipboard operation
cli copied to clipboard

Supabase DB Link intermittent issue

Open JohnPhilipCurbPage opened this issue 2 months ago • 59 comments

For some reason, I mistakenly enter a wrong cli line and try to end the terminal quickly, then after I trying to use supabase link -- it will eventually give me this kind of error. Then tomorrow it will work, like why?

I am doing some researches and documentations for best practices and methods for supabase branching. So please fix this kind of Issue and I don't think it is related on wrong password or low internet. Since eventually it will work tomorrow

WARN: no SMS provider is enabled. Disabling phone login
Initialising login role...
unexpected unban status 403: {"message":"Your account does not have the necessary privileges to access this endpoint. For more details, refer to our documentation https://supabase.com/docs/guides/platform/access-control"}
failed to connect as temp role: failed to connect to `host=aws-1-us-east-2.pooler.supabase.com user=cli_login_postgres.zeirbusysajgrwsjgdzz database=postgres`: server error (FATAL: Authentication error, reason: "Authentication query failed: %DBConnection.ConnectionError{message: \"connection not available and request was dropped from queue after 10000ms. This means requests are coming in and your connection pool cannot serve them fast enough. You can address this by:\\n\\n  1. Ensuring your database is available and that you can connect to it\\n  2. Tracking down slow queries and making sure they are running fast enough\\n  3. Increasing the pool_size (although this increases resource consumption)\\n  4. Allowing requests to wait longer by increasing :queue_target and :queue_interval\\n\\nSee DBConnection.start_link/2 for more information\\n\", severity: :error, reason: :queue_timeout}" (SQLSTATE XX000))
Retry (3/8): failed to connect as temp role: failed to connect to `host=aws-1-us-east-2.pooler.supabase.com user=cli_login_postgres.zeirbusysajgrwsjgdzz database=postgres`: server error (FATAL: Authentication error, reason: "Authentication query failed: %DBConnection.ConnectionError{message: \"connection not available and request was dropped from queue after 10000ms. This means requests are coming in and your connection pool cannot serve them fast enough. You can address this by:\\n\\n  1. Ensuring your database is available and that you can connect to it\\n  2. Tracking down slow queries and making sure they are running fast enough\\n  3. Increasing the pool_size (although this increases resource consumption)\\n  4. Allowing requests to wait longer by increasing :queue_target and :queue_interval\\n\\nSee DBConnection.start_link/2 for more information\\n\", severity: :error, reason: :queue_timeout}" (SQLSTATE XX000))
Retry (4/8): failed to connect as temp role: failed to connect to `host=aws-1-us-east-2.pooler.supabase.com user=cli_login_postgres.zeirbusysajgrwsjgdzz database=postgres`: dial error (dial tcp 3.148.140.216:5432: connect: connection refused)
Retry (5/8): unexpected unban status 403: {"message":"Your account does not have the necessary privileges to access this endpoint. For more details, refer to our documentation https://supabase.com/docs/guides/platform/access-control"}
failed to connect as temp role: failed to connect to `host=aws-1-us-east-2.pooler.supabase.com user=cli_login_postgres.zeirbusysajgrwsjgdzz database=postgres`: server error (FATAL: Authentication error, reason: "Authentication query failed: %DBConnection.ConnectionError{message: \"connection not available and request was dropped from queue after 10000ms. This means requests are coming in and your connection pool cannot serve them fast enough. You can address this by:\\n\\n  1. Ensuring your database is available and that you can connect to it\\n  2. Tracking down slow queries and making sure they are running fast enough\\n  3. Increasing the pool_size (although this increases resource consumption)\\n  4. Allowing requests to wait longer by increasing :queue_target and :queue_interval\\n\\nSee DBConnection.start_link/2 for more information\\n\", severity: :error, reason: :queue_timeout}" (SQLSTATE XX000))
Retry (6/8): failed to connect as temp role: failed to connect to `host=aws-1-us-east-2.pooler.supabase.com user=cli_login_postgres.zeirbusysajgrwsjgdzz database=postgres`: server error (FATAL: Authentication error, reason: "Authentication query failed: %DBConnection.ConnectionError{message: \"connection not available and request was dropped from queue after 10000ms. This means requests are coming in and your connection pool cannot serve them fast enough. You can address this by:\\n\\n  1. Ensuring your database is available and that you can connect to it\\n  2. Tracking down slow queries and making sure they are running fast enough\\n  3. Increasing the pool_size (although this increases resource consumption)\\n  4. Allowing requests to wait longer by increasing :queue_target and :queue_interval\\n\\nSee DBConnection.start_link/2 for more information\\n\", severity: :error, reason: :queue_timeout}" (SQLSTATE XX000))
Retry (7/8): failed to connect as temp role: failed to connect to `host=aws-1-us-east-2.pooler.supabase.com user=cli_login_postgres.zeirbusysajgrwsjgdzz database=postgres`: server error (FATAL: Authentication error, reason: "Authentication query failed: %DBConnection.ConnectionError{message: \"connection not available and request was dropped from queue after 10000ms. This means requests are coming in and your connection pool cannot serve them fast enough. You can address this by:\\n\\n  1. Ensuring your database is available and that you can connect to it\\n  2. Tracking down slow queries and making sure they are running fast enough\\n  3. Increasing the pool_size (although this increases resource consumption)\\n  4. Allowing requests to wait longer by increasing :queue_target and :queue_interval\\n\\nSee DBConnection.start_link/2 for more information\\n\", severity: :error, reason: :queue_timeout}" (SQLSTATE XX000))
Retry (8/8): Forgot your password? Reset it from the Dashboard: https://supabase.com/dashboard/project/zeirbusysajgrwsjgdzz/settings/database
Enter your database password: 
Connecting to remote database...
failed to connect to postgres: failed to connect to `host=aws-1-us-east-2.pooler.supabase.com user=postgres.zeirbusysajgrwsjgdzz database=postgres`: failed SASL auth (FATAL: password authentication failed for user "postgres" (SQLSTATE 28P01))

JohnPhilipCurbPage avatar Nov 07 '25 12:11 JohnPhilipCurbPage

From what I've gathered there's a bug with the how the db role created for CLI logins interacts with the connection pooler.

The workaround is skipping the pooler with supabase link --skip-pooler or adding a DB password env var to your link command like so: SUPABASE_DB_PASSWORD=[password] supabase link

raparri01 avatar Nov 07 '25 15:11 raparri01

For reference quite a few of us struggling with this here : https://github.com/supabase/cli/issues/4302#issuecomment-3506595086

haveaguess avatar Nov 08 '25 14:11 haveaguess

fwiw, experiencing this when trying to reset db with supabase db reset --linked.

Completely kills momentum as it randomly blocks critical path.

Initialising login role...
failed to connect as temp role: failed to connect to `host=aws-1-eu-west-3.pooler.supabase.com user=cli_login_postgres.unxizwyryahdndkjkroi database=postgres`: server error (FATAL: Authentication error, reason: "Authentication query failed: %DBConnection.ConnectionError{message: \"connection not available and request was dropped from queue after 10000ms. This means requests are coming in and your connection pool cannot serve them fast enough. You can address this by:\\n\\n  1. Ensuring your database is available and that you can connect to it\\n  2. Tracking down slow queries and making sure they are running fast enough\\n  3. Increasing the pool_size (although this increases resource consumption)\\n  4. Allowing requests to wait longer by increasing :queue_target and :queue_interval\\n\\nSee DBConnection.start_link/2 for more information\\n\", severity: :error, reason: :queue_timeout}" (SQLSTATE XX000))
Retry (3/8): failed to connect as temp role: failed to connect to `host=aws-1-eu-west-3.pooler.supabase.com user=cli_login_postgres.unxizwyryahdndkjkroi database=postgres`: server error (FATAL: Authentication error, reason: "Authentication query failed: %DBConnection.ConnectionError{message: \"connection not available and request was dropped from queue after 10000ms. This means requests are coming in and your connection pool cannot serve them fast enough. You can address this by:\\n\\n  1. Ensuring your database is available and that you can connect to it\\n  2. Tracking down slow queries and making sure they are running fast enough\\n  3. Increasing the pool_size (although this increases resource consumption)\\n  4. Allowing requests to wait longer by increasing :queue_target and :queue_interval\\n\\nSee DBConnection.start_link/2 for more information\\n\", severity: :error, reason: :queue_timeout}" (SQLSTATE XX000))
Retry (4/8): failed to connect as temp role: failed to connect to `host=aws-1-eu-west-3.pooler.supabase.com user=cli_login_postgres.unxizwyryahdndkjkroi database=postgres`: server error (FATAL: Authentication error, reason: "Authentication query failed: %DBConnection.ConnectionError{message: \"connection not available and request was dropped from queue after 10000ms. This means requests are coming in and your connection pool cannot serve them fast enough. You can address this by:\\n\\n  1. Ensuring your database is available and that you can connect to it\\n  2. Tracking down slow queries and making sure they are running fast enough\\n  3. Increasing the pool_size (although this increases resource consumption)\\n  4. Allowing requests to wait longer by increasing :queue_target and :queue_interval\\n\\nSee DBConnection.start_link/2 for more information\\n\", severity: :error, reason: :queue_timeout}" (SQLSTATE XX000))
Retry (5/8): failed to connect as temp role: failed to connect to `host=aws-1-eu-west-3.pooler.supabase.com user=cli_login_postgres.unxizwyryahdndkjkroi database=postgres`: dial error (dial tcp 52.47.148.215:5432: connect: connection refused)
Retry (6/8): failed to connect as temp role: failed to connect to `host=aws-1-eu-west-3.pooler.supabase.com user=cli_login_postgres.unxizwyryahdndkjkroi database=postgres`: server error (FATAL: Authentication error, reason: "Authentication query failed: %DBConnection.ConnectionError{message: \"connection not available and request was dropped from queue after 10000ms. This means requests are coming in and your connection pool cannot serve them fast enough. You can address this by:\\n\\n  1. Ensuring your database is available and that you can connect to it\\n  2. Tracking down slow queries and making sure they are running fast enough\\n  3. Increasing the pool_size (although this increases resource consumption)\\n  4. Allowing requests to wait longer by increasing :queue_target and :queue_interval\\n\\nSee DBConnection.start_link/2 for more information\\n\", severity: :error, reason: :queue_timeout}" (SQLSTATE XX000))
Retry (7/8): failed to connect as temp role: failed to connect to `host=aws-1-eu-west-3.pooler.supabase.com user=cli_login_postgres.unxizwyryahdndkjkroi database=postgres`: server error (FATAL: Authentication error, reason: "Authentication query failed: %DBConnection.ConnectionError{message: \"connection not available and request was dropped from queue after 10000ms. This means requests are coming in and your connection pool cannot serve them fast enough. You can address this by:\\n\\n  1. Ensuring your database is available and that you can connect to it\\n  2. Tracking down slow queries and making sure they are running fast enough\\n  3. Increasing the pool_size (although this increases resource consumption)\\n  4. Allowing requests to wait longer by increasing :queue_target and :queue_interval\\n\\nSee DBConnection.start_link/2 for more information\\n\", severity: :error, reason: :queue_timeout}" (SQLSTATE XX000))
Retry (8/8): Forgot your password? Reset it from the Dashboard: https://supabase.com/dashboard/project/unxizwyryahdndkjkroi/settings/database
Enter your database password: 
Do you want to reset the remote database? [y/N] 

kaykut avatar Nov 09 '25 11:11 kaykut

Repeatable pooler timeout during supabase link (Confirmed workaround: use --skip-pooler)

I'm seeing what looks like a repeatable issue when trying to link a hosted Supabase project using the latest CLI beta (2.58.3).


Observed behavior

When running:

npx supabase@beta link --debug

The command fails with:

failed to connect to postgres: failed to connect to `host=aws-1-eu-west-1.pooler.supabase.com ...`: failed to receive message (timeout: context deadline exceeded)

This happens consistently on the first PG Send during pooler authentication. The project itself is healthy and accessible through the Supabase dashboard.


Reproduction

  • CLI version: 2.58.3 (npx supabase@beta)
  • Environment: Ubuntu 22.04, Node 20.x
  • Command: npx supabase@beta link --debug
  • Region: eu-west-1

Details

The CLI tries to connect via the connection pooler, but fails with:

Authentication error, reason: "connection not available and request was dropped from queue after 10000ms"

It sounds like the pooler queue is full or the connection request just times out, even though the project’s Postgres DB is reachable from the dashboard and through direct psql connections. Maybe the CLI just defaults to the pooler too early?


Workaround

Running the same command with the new --skip-pooler flag seems to fix it:

npx supabase@beta link \
  --project-ref <project_id> \
  --skip-pooler \
  --debug

That forces a direct connection to the main Postgres instance (aws-1-eu-west-1.supabase.co) and successfully completes the link:

Finished supabase link.
WARNING: Local database version differs from the linked project.
Update your supabase/config.toml to fix it:
[db]
major_version = 17

Notes

  • The problem seems isolated to the pooler (aws-1-eu-west-1.pooler.supabase.com) during the initial link step.
  • Direct connections (aws-1-eu-west-1.supabase.co) work fine.
  • It was repeatable every time until --skip-pooler was used.
  • Could be transient load on the pooler, dunno.

Suggested fix

Would be great if the CLI could:

  1. Fallback automatically to a direct connection if the pooler times out or fails during link.
  2. Improve the error message to hint that --skip-pooler might help when this happens.
  3. Maybe even detect hosted environments where the pooler isn’t really needed for linking and skip it by default.

Not a huge bug, just confusing when usually... it just works. Took a bit of head-scratching to figure out what was actually happening.

gavinc avatar Nov 09 '25 15:11 gavinc

  1. --skip_pooler workaround is not working in my case. debug logs below.

  2. just in case, I also changed the password to remove all special characters per https://github.com/supabase/cli/issues/4302#issuecomment-3508678772 - same output.

The issue is indeed intermittent, but it is actually happening 90+% of the time, so effectively the project development is fully blocked.


*[analytics-mvp-implementation][~/Coding/ruyamda]$ supabase link --skip-pooler
Selected project: unxizwyryahdndkjkroi
Initialising login role...
failed to connect as temp role: failed to connect to `host=aws-1-eu-west-3.pooler.supabase.com user=cli_login_postgres.unxizwyryahdndkjkroi database=postgres`: dial error (dial tcp 52.47.148.215:5432: connect: connection refused)
Retry (3/8): failed to connect as temp role: failed to connect to `host=aws-1-eu-west-3.pooler.supabase.com user=cli_login_postgres.unxizwyryahdndkjkroi database=postgres`: dial error (dial tcp 35.181.159.10:5432: connect: connection refused)
Retry (4/8): failed to connect as temp role: failed to connect to `host=aws-1-eu-west-3.pooler.supabase.com user=cli_login_postgres.unxizwyryahdndkjkroi database=postgres`: dial error (dial tcp 52.47.148.215:5432: connect: connection refused)
Retry (5/8): failed to connect as temp role: failed to connect to `host=aws-1-eu-west-3.pooler.supabase.com user=cli_login_postgres.unxizwyryahdndkjkroi database=postgres`: dial error (dial tcp 52.47.148.215:5432: connect: connection refused)
Retry (6/8): failed to connect as temp role: failed to connect to `host=aws-1-eu-west-3.pooler.supabase.com user=cli_login_postgres.unxizwyryahdndkjkroi database=postgres`: dial error (dial tcp 52.47.148.215:5432: connect: connection refused)
Retry (7/8): ^CConnecting to remote database...
failed to connect to postgres: failed to connect to `host=aws-1-eu-west-3.pooler.supabase.com user=postgres.unxizwyryahdndkjkroi database=postgres`: hostname resolving error (lookup aws-1-eu-west-3.pooler.supabase.com: operation was canceled)



*[analytics-mvp-implementation][~/Coding/ruyamda]$ supabase link --skip-pooler
Selected project: unxizwyryahdndkjkroi
Initialising login role...
Connecting to remote database...
failed to connect to postgres: failed to connect to `host=db.unxizwyryahdndkjkroi.supabase.co user=cli_login_postgres database=postgres`: dial error (dial tcp [2a05:d012:42e:5715:dda1:9689:611:eec4]:5432: connect: no route to host)
Try rerunning the command with --debug to troubleshoot the error.


*[analytics-mvp-implementation][~/Coding/ruyamda]$ supabase link --skip-pooler --debug
open supabase/.temp/profile: no such file or directory
Supabase CLI 2.54.11
Using profile: supabase (supabase.co)
Loading project ref from file: supabase/.temp/project-ref
Using access token for profile: supabase
2025/11/10 11:38:31 HTTP GET: https://api.supabase.com/v1/projects
Selected project: unxizwyryahdndkjkroi
2025/11/10 11:38:34 HTTP GET: https://api.supabase.com/v1/projects/unxizwyryahdndkjkroi
2025/11/10 11:38:35 HTTP GET: https://api.supabase.com/v1/projects/unxizwyryahdndkjkroi/api-keys?reveal=true
2025/11/10 11:38:36 HTTP GET: https://api.supabase.com/v1/projects/unxizwyryahdndkjkroi/network-restrictions
2025/11/10 11:38:36 HTTP GET: https://api.supabase.com/v1/projects/unxizwyryahdndkjkroi/config/database/postgres
2025/11/10 11:38:36 HTTP GET: https://api.supabase.com/v1/projects/unxizwyryahdndkjkroi/config/storage
2025/11/10 11:38:36 HTTP GET: https://api.supabase.com/v1/projects/unxizwyryahdndkjkroi/config/auth
2025/11/10 11:38:36 HTTP GET: https://api.supabase.com/v1/projects/unxizwyryahdndkjkroi/postgrest
2025/11/10 11:38:36 HTTP GET: https://unxizwyryahdndkjkroi.supabase.co/rest/v1/
2025/11/10 11:38:36 HTTP GET: https://unxizwyryahdndkjkroi.supabase.co/auth/v1/health
2025/11/10 11:38:36 HTTP GET: https://unxizwyryahdndkjkroi.supabase.co/storage/v1/version
Error status 503: {"code":"PGRST002","details":null,"hint":null,"message":"Could not query the database for the schema cache. Retrying."}
Pooler URL is not configured
Initialising login role...
2025/11/10 11:38:38 HTTP POST: https://api.supabase.com/v1/projects/unxizwyryahdndkjkroi/cli/login-role
Connecting to remote database...
failed to connect to postgres: failed to connect to `host=db.unxizwyryahdndkjkroi.supabase.co user=cli_login_postgres database=postgres`: dial error (dial tcp [2a05:d012:42e:5715:dda1:9689:611:eec4]:5432: connect: no route to host)


kaykut avatar Nov 10 '25 10:11 kaykut

After

  1. having tried this with various supabase CLI versions (installed via brew or directly via node) and having failed,
  2. having troubleshot network & DNS

I have strong doubts this is an actual network-related issue (not related to the client).

I fully understand the pita of addressing intermittent & seemingly one-off issues, and I'd be more than happy to provide any troubleshooting outputs that may be of help. 🙏

kaykut avatar Nov 10 '25 11:11 kaykut

After

  1. having tried this with various supabase CLI versions (installed via brew or directly via node) and having failed,
  2. having troubleshot network & DNS

I have strong doubts this is an actual network-related issue (not related to the client).

I fully understand the pita of addressing intermittent & seemingly one-off issues, and I'd be more than happy to provide any troubleshooting outputs that may be of help. 🙏

Indeed, to note today, for the past hour, I have experienced this 100% of the time, unable to connect, migrate, anything on a linked project. I tried to re-create the link, but sadly hitting the same as others above.

Note that:

SUPABASE_DB_PASSWORD=[password] supabase link

Worked for me in the end.

SteveChurch avatar Nov 10 '25 11:11 SteveChurch

This stuff is killing on the pull command...has not been able to work around it I am looking to use my local for testing, and looking to migrate my remote to my local

frontend $ npx supabase db pull --debug open supabase.temp\profile: The system cannot find the file specified. Loading project ref from file: supabase.temp\project-ref Using connection pooler: postgresql://postgres.ifsgdmkfqvwanwzqwwdy@aws-1-eu-west-2.pooler.supabase.com:5432/postgres Initialising login role... Using access token for profile: supabase failed to connect as temp role: failed to connect to host=aws-1-eu-west-2.pooler.supabase.com user=cli_login_postgres.ifsgdmkfqvwanwzqwwdy database=postgres: server error (FATAL: {:shutdown, :db_termination} (SQLSTATE XX000)) Retry (1/8): Supabase CLI 2.54.11 Using profile: supabase (supabase.co) Connecting to remote database... failed to connect to postgres: failed to connect to host=aws-1-eu-west-2.pooler.supabase.com user=postgres.ifsgdmkfqvwanwzqwwdy database=postgres: hostname resolving error (lookup aws-1-eu-west-2.pooler.supabase.com: operation was canceled)

Okpala76 avatar Nov 10 '25 19:11 Okpala76

Repeatable pooler timeout during supabase link (Confirmed workaround: use --skip-pooler)

I'm seeing what looks like a repeatable issue when trying to link a hosted Supabase project using the latest CLI beta (2.58.3).

Observed behavior

When running:

npx supabase@beta link --debug The command fails with:

failed to connect to postgres: failed to connect to `host=aws-1-eu-west-1.pooler.supabase.com ...`: failed to receive message (timeout: context deadline exceeded)

This happens consistently on the first PG Send during pooler authentication. The project itself is healthy and accessible through the Supabase dashboard.

Reproduction

  • CLI version: 2.58.3 (npx supabase@beta)
  • Environment: Ubuntu 22.04, Node 20.x
  • Command: npx supabase@beta link --debug
  • Region: eu-west-1

Details

The CLI tries to connect via the connection pooler, but fails with:

Authentication error, reason: "connection not available and request was dropped from queue after 10000ms"

It sounds like the pooler queue is full or the connection request just times out, even though the project’s Postgres DB is reachable from the dashboard and through direct psql connections. Maybe the CLI just defaults to the pooler too early?

Workaround

Running the same command with the new --skip-pooler flag seems to fix it:

npx supabase@beta link
--project-ref <project_id>
--skip-pooler
--debug That forces a direct connection to the main Postgres instance (aws-1-eu-west-1.supabase.co) and successfully completes the link:

Finished supabase link.
WARNING: Local database version differs from the linked project.
Update your supabase/config.toml to fix it:
[db]
major_version = 17

Notes

  • The problem seems isolated to the pooler (aws-1-eu-west-1.pooler.supabase.com) during the initial link step.
  • Direct connections (aws-1-eu-west-1.supabase.co) work fine.
  • It was repeatable every time until --skip-pooler was used.
  • Could be transient load on the pooler, dunno.

Suggested fix

Would be great if the CLI could:

  1. Fallback automatically to a direct connection if the pooler times out or fails during link.
  2. Improve the error message to hint that --skip-pooler might help when this happens.
  3. Maybe even detect hosted environments where the pooler isn’t really needed for linking and skip it by default.

Not a huge bug, just confusing when usually... it just works. Took a bit of head-scratching to figure out what was actually happening.

Repeatable pooler timeout during supabase link (Confirmed workaround: use --skip-pooler)

I'm seeing what looks like a repeatable issue when trying to link a hosted Supabase project using the latest CLI beta (2.58.3).

Observed behavior

When running:

npx supabase@beta link --debug The command fails with:

failed to connect to postgres: failed to connect to `host=aws-1-eu-west-1.pooler.supabase.com ...`: failed to receive message (timeout: context deadline exceeded)

This happens consistently on the first PG Send during pooler authentication. The project itself is healthy and accessible through the Supabase dashboard.

Reproduction

  • CLI version: 2.58.3 (npx supabase@beta)
  • Environment: Ubuntu 22.04, Node 20.x
  • Command: npx supabase@beta link --debug
  • Region: eu-west-1

Details

The CLI tries to connect via the connection pooler, but fails with:

Authentication error, reason: "connection not available and request was dropped from queue after 10000ms"

It sounds like the pooler queue is full or the connection request just times out, even though the project’s Postgres DB is reachable from the dashboard and through direct psql connections. Maybe the CLI just defaults to the pooler too early?

Workaround

Running the same command with the new --skip-pooler flag seems to fix it:

npx supabase@beta link
--project-ref <project_id>
--skip-pooler
--debug That forces a direct connection to the main Postgres instance (aws-1-eu-west-1.supabase.co) and successfully completes the link:

Finished supabase link.
WARNING: Local database version differs from the linked project.
Update your supabase/config.toml to fix it:
[db]
major_version = 17

Notes

  • The problem seems isolated to the pooler (aws-1-eu-west-1.pooler.supabase.com) during the initial link step.
  • Direct connections (aws-1-eu-west-1.supabase.co) work fine.
  • It was repeatable every time until --skip-pooler was used.
  • Could be transient load on the pooler, dunno.

Suggested fix

Would be great if the CLI could:

  1. Fallback automatically to a direct connection if the pooler times out or fails during link.
  2. Improve the error message to hint that --skip-pooler might help when this happens.
  3. Maybe even detect hosted environments where the pooler isn’t really needed for linking and skip it by default.

Not a huge bug, just confusing when usually... it just works. Took a bit of head-scratching to figure out what was actually happening.

this does not exist as a flag

unknown flag: --skip-pooler

Okpala76 avatar Nov 10 '25 19:11 Okpala76

this does not exist as a flag

it's on the beta version but plenty of us still have issues

haveaguess avatar Nov 10 '25 20:11 haveaguess

Here's a script to help with debugging

  1. First do this

https://supabase.com/dashboard/project/CHANGE_ME/database/settings

and look "Network Bans"


#!/bin/bash

# Supabase Database Generation Script
# This script logs in, links to your project, repairs migrations, pulls the schema, and generates TypeScript types

set -e  # Exit on error

# Project configuration
PROJECT_ID="CHANGE_ME"

# Database connection details
DB_HOST="db.${PROJECT_ID}.supabase.co"
DB_PORT="5432"
DB_NAME="postgres"
DB_USER="postgres"

# Prompt for database password if not set
if [ -z "$DB_PASSWORD" ]; then
  echo "Please enter your database password:"
  read -s DB_PASSWORD
  echo ""
fi

echo "Step 1: Logging into Supabase..."
pnpm supabase login --debug

echo ""
echo "Step 2: Linking to Supabase project..."
pnpm supabase link --project-ref "$PROJECT_ID" --password "$DB_PASSWORD" --skip-pooler --debug

echo ""
echo "Step 3: Repairing migration history..."
pnpm supabase migration repair --status applied 20251110201338 --debug

echo ""
echo "Step 4: Pulling database schema..."
pnpm supabase db pull --debug

echo ""
echo "Step 5: Generating TypeScript types..."
pnpm supabase gen types typescript --project-id "$PROJECT_ID" --schema public > lib/types/database.types.ts

echo ""
echo "Done! TypeScript types have been generated at lib/types/database.types.ts"


Castrosteven avatar Nov 10 '25 20:11 Castrosteven

this does not exist as a flag

it's on the beta version but plenty of us still have issues

How do i install the beta..coz i basically follow npx recommendations to get the beta..

Although mine finally went through

i used

npx supabase db pull --db-url {pooler url or direct url } link from supbase dashboard

Okpala76 avatar Nov 10 '25 23:11 Okpala76

I'm getting the same exact issue. Setting the database password on the CLI or using --skip-pooler isn't working for me.

I did notice an IP address on my ban list which I don't think was there before but it's an ipv6 address. I'm pretty sure I'm only on ipv4 at the moment.

Ebsan avatar Nov 11 '25 00:11 Ebsan

I'm seeing this happen on a daily basis starting a few days ago. Right around 12am PT every night. I don't know how long it lasts, but when I wake up the next morning, it's fixed.

ojanvafai avatar Nov 11 '25 08:11 ojanvafai

Attaching the output of the debug script. The script ends with an error, even though I am able to execute

supabase link supabase db reset --linked
pnpm supabase gen types typescript --project-id "$PROJECT_ID" --schema public

successfully at the moment.

Also to note: Supabase support responded to my ticket yesterday pointing at the network ban as potential issue. There was indeed an IP banned, removed it overeagerly before checking if it was mine, but it seems safe to assume so since for the moment I seem to be able to run db commands I need (even though script errors out).

A recommendation for everyone experiencing the issue would be to check banned IPs on https://supabase.com/dashboard/project/unxizwyryahdndkjkroi/database/settings.

supabae_debug_output.txt

kaykut avatar Nov 11 '25 09:11 kaykut

Just a note that I'm having this issue across multiple projects too. Installing the beta still didn't allow me to use the --skip-pooler flag.

npm install supabase@beta --save-dev

scottybo avatar Nov 11 '25 10:11 scottybo

Update: Right now, not only the supabase db commands are failing but also all requests from my pre-production web application to my db instance are failing with HTTP 503.

Since the issue is invisible in supabase status dashboard, this must be small enough not to be caught on system-wide monitoring, however, it is making supabase completely unusable for affected users. :-(

kaykut avatar Nov 11 '25 13:11 kaykut

This is happening to me too:

failed to connect to postgres: failed to connect to host=aws-1-us-east-2.pooler.supabase.com user=postgres.wkhwuynpnirsojzqwndm database=postgres: hostname resolving error (lookup aws-1-us-east-2.pooler.supabase.com: operation was canceled)

dineshmistry avatar Nov 11 '25 15:11 dineshmistry

You cannot use --skip-pooler with any other command than supabase link as this is where it creates the supabase/.temp/pooler-url file which is used by the CLI for subsequent requests made by other CLI command. As I mentioned in the previous issue post you need to delete that file and run supabase link --skip-pooler in order for the workaround to work.

I am pasting below what @sweatybridge mentioned in the other post too:

To sum up the issue in this thread.

We have a problem where the cli_login_postgres role does not play nicely with pooler. The reason is cli creates a temporary password for each login, but pooler maintains a password cache that becomes stale. Direct connection doesn't have this problem with stale cache.

So the workarounds are

Use postgres role for login by providing your password as an env var

SUPABASE_DB_PASSWORD=your-pass supabase link

If you have IPv6 enabled locally, skip pooler and connect directly.

supabase link --skip-pooler

silentworks avatar Nov 11 '25 15:11 silentworks

I had similar problem that is not connecting to DB and keep pending after this message

Initialising login role...

then I found that Supabase automatically blocks suspicious connection try and ban my connection ip.

So try to UNBAN the ip that is on the blocking list. it worked out for me

Image

rungchan2 avatar Nov 12 '25 05:11 rungchan2

I've updated the auto unban logic to include all IP addresses. Please give npx supabase@beta link a try and let me know if things have improved.

sweatybridge avatar Nov 12 '25 06:11 sweatybridge

I didnt havent any bans at any point but I still have the issue

haveaguess avatar Nov 12 '25 11:11 haveaguess

Here's a script to help with debugging

  1. First do this

https://supabase.com/dashboard/project/CHANGE_ME/database/settings

and look "Network Bans"

Thanks for me was my ip was flagged and blocked, removing it from the list solved even though it adds me back after 2-3 calls to the supabase link command

tonxxd avatar Nov 12 '25 16:11 tonxxd

I'm having same problem, running supabase link --skip-pooler solved the problem for me (so far)

I do see a single IPv6 address in my ban list, but I don't think it's mine (my ISP doesn't use IPv6 AFAIK)

boozedog avatar Nov 13 '25 11:11 boozedog

Fixed the function deploy by (1) pointing config.toml at supabase/functions/agents/xyz/index.ts, (2) regenerating supabase/functions/deno.lock with Deno 1.45.5 so the CLI container reads a v3 lock and the new esm.sh hash, and (3) re-running deno check + supabase functions deploy xyz --debug, which succeeds for the local project.

Production deploy is still 403ing because the Supabase account lost “Functions → Deploy” rights. Maybe the user ID changed in the Org and access level?

Sophanos avatar Nov 14 '25 23:11 Sophanos

We are still seeing this issue as well

  • no IPs banned
  • appears inconsistently

johnCbogil avatar Nov 16 '25 20:11 johnCbogil

This happens since a few days in evening hours CET, both with "--skip-pooler" and without this setting:

The --debug switch clearly shows network issues:

failed to connect to postgres: failed to connect to host=db.xxxxx.supabase.co user=postgres database=postgres: dial error (dial tcp [2a05:d018:135e:1618:6837:6117:400a:c699]:5432: connect: no route to host)

itinance avatar Nov 17 '25 22:11 itinance

I'm getting the same exact issue. Setting the database password on the CLI or using --skip-pooler isn't working for me.

I did notice an IP address on my ban list which I don't think was there before but it's an ipv6 address. I'm pretty sure I'm only on ipv4 at the moment.

It isn't an IPV6, it's a reference. I don't have a IPV6 and I removed the item on the ban list and connected successfully, none of the above steps worked before this.

aegrey avatar Nov 18 '25 18:11 aegrey

Also have an issue...

Race428 avatar Nov 20 '25 18:11 Race428

This is blocking all my supabase CLI commands

lukemun avatar Nov 21 '25 19:11 lukemun