DB Push Connection Failure
I am trying to connect to Push migrations to a supabase project. I have already managed to link to it, but when I try the Push, I get a connection failure, -timeout.
$ npx supabase link --project-ref zhkvauouoghegocslzhi -p PWDpwdPWDpwdPWDpwd
Connecting to remote database...
NOTICE (42P06): schema "supabase_migrations" already exists, skipping
NOTICE (42P07): relation "schema_migrations" already exists, skipping
NOTICE (42701): column "statements" of relation "schema_migrations" already exists, skipping
NOTICE (42701): column "name" of relation "schema_migrations" already exists, skipping
NOTICE (42P06): schema "supabase_migrations" already exists, skipping
NOTICE (42P07): relation "seed_files" already exists, skipping
Finished supabase link.
WARNING: Local config differs from linked project. Try updating supabase\config.toml
diff supabase\config.toml zhkvauouoghegocslzhi
--- supabase\config.toml
+++ zhkvauouoghegocslzhi
@@ -58,8 +58,8 @@
[auth]
enabled = true
-site_url = "http://127.0.0.1:3000"
-additional_redirect_urls = ["https://127.0.0.1:3000"]
+site_url = "http://localhost:3000"
+additional_redirect_urls = []
jwt_expiry = 3600
enable_refresh_token_rotation = true
refresh_token_reuse_interval = 10
@@ -101,9 +101,9 @@
[auth.email]
enable_signup = true
double_confirm_changes = true
-enable_confirmations = false
+enable_confirmations = true
secure_password_change = false
-max_frequency = "1s"
+max_frequency = "1m0s"
otp_length = 6
otp_expiry = 3600
[auth.email.template]
$ npx supabase db push --debug -p PWDpwdPWDpwdPWDpwd
Using connection pooler: postgresql://postgres.zhkvauouoghegocslzhi:[YOUR-PASSWORD]@aws-1-eu-west-2.pooler.supabase.com:6543/postgres
Supabase CLI 2.34.3
Connecting to remote database...
failed to connect to postgres: failed to connect to host=aws-1-eu-west-2.pooler.supabase.com user=postgres.zhkvauouoghegocslzhi database=postgres: dial error (timeout: dial tcp 13.41.127.111:5432: i/o timeout)
What is going on?12 Replies
@maxweld looks like a network or connection pooling issue. Try disabling the pooler by connecting directly on port 5432 or whitelist your IP in Supabase project settings
@Ad Intellegent OK, I have added my external IP Address to the 'allow' restrictions in the Database settings. I think this is what you mean by 'whitelist'? I am now getting timouts on the connection for the link.
Are my commands correctly formed?
I should perhaps mention that I am using the Free version of Supabase.
Do you have a firewall on your computer, maybe this is blocking the request. Try disabling it temporarily and then try again. Also try with a VPN if that doesn't work to see if it works.
OK - I am using my VPN, and also removed any restrictions on IP Addresses. The restrictions were put on as part of trying @Ad Intellegent 's suggestion. It now seems to fail due to the password.
I have just reset the Database Password, and tried again, using it in both commands with the -p option. Is this what I am supposed to do. The link works, but the DB Push fails ...
I have just reset the Database Password, and tried again, using it in both commands with the -p option. Is this what I am supposed to do. The link works, but the DB Push fails ...
Does the password contain any special characters? it doesn't like special characters like
@ in the password.No special chars, just Upper and Lowercase letters.
Can you use a GUI editor like TablePlus or pgAdmin to see if you can get access to your database using the db credentials?
Hi and thanks for you assistance. I have just installed pgAdmin but am still failing to connect. Here are the parameters I am using in the pgAdmin register Server dialog:
Name: zhkvauouoghegocslzhi (the Supabase Project ID)
hostname/address: aws-1-eu-west-2.pooler.supabase.com
port: I tried 6543 and 5432
Maintenance Database: postgres
username : postgres
Kerberos authentication: disabled
password: the Supabase DB Password
role and service I left blank.
I was getting an error, something about Tennant or User not found I think was the, but I did not copy it down. But after a bit of trying different parameters it has now changed to a connection timeout. I reset the parameters back to the above which gave me the original error, but now still get the timeout message.
As this is the first time using pgAdmin, I hope I am using the correct connection parameters??
Username would be
postgres.tenant_id as shown in the connection string dialog in the dashboard. You should be using the session pooler information.Hi - yesy just managed to connect pgAdmin to the DB with that. so now need to investigate why I cannot connect from the Supabase CLI
Yes this seems weird since pgAdmin works without any issue
Let me investigate my end for now. I will let you know how I get on - thanks for assistance thus far.