Can't reach database Error #4161
-
Hi there, I’m building a prototype NextJs app using Prisma ORM and Supabase PostgresSQL database. However, I’m receiving the following error:
Details: M1 MacOS Monteray 12.0.1 Next.js v12.0.4 prisma : 3.5.0
Any assistence would be greatly appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 35 comments 38 replies
-
Can you send your project references to [email protected]? We'll take a look at this. |
Beta Was this translation helpful? Give feedback.
-
Can you make sure your password doesn't have any weird characters in it like a |
Beta Was this translation helpful? Give feedback.
-
It was working then suddenly I got this error but I have not changed the password. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
same on this |
Beta Was this translation helpful? Give feedback.
-
Having the same issue it was working fine all of the sudden it stops working.. I'm pretty sure it has a correlation to the Prisma client as my login form still works
|
Beta Was this translation helpful? Give feedback.
-
What fixed it for me was that a free tier project had gone into inactive mode and I just had to restart it, not sure if this will help anyone. |
Beta Was this translation helpful? Give feedback.
-
Suddenly got this too. No changes to DB credentials. Restarted yesterday and it was still working fine. Have tried connecting through pgadmin, prisma, and psql |
Beta Was this translation helpful? Give feedback.
-
Having this same issue with my dev environment (localhost). Curiously, my live site, hosted on Vercel and which uses the same database, works just fine. |
Beta Was this translation helpful? Give feedback.
-
I forgot what I did because has been a long time but I think it was just
enabling the project because supabase disables it?
…On Sat, 17 Jun 2023, 8:51 pm jmilus, ***@***.***> wrote:
Having this same issue with my dev environment (localhost). Curiously, my
live site, hosted on Vercel and which uses the same database, works just
fine.
Problem appeared overnight. Worked fine last night before bed, and now
refuses to function with morning coffee. Restarted everything, updated
everything...
—
Reply to this email directly, view it on GitHub
<#4161 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AUXM4BT5BQFE5NAYHYQTIZ3XLXBV3ANCNFSM5JA2I56Q>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Haven't encountered this issue after the first time
On Sat, 17 Jun 2023, 9:26 pm Nimesh Maharjan, ***@***.***>
wrote:
… I forgot what I did because has been a long time but I think it was just
enabling the project because supabase disables it?
On Sat, 17 Jun 2023, 8:51 pm jmilus, ***@***.***> wrote:
> Having this same issue with my dev environment (localhost). Curiously, my
> live site, hosted on Vercel and which uses the same database, works just
> fine.
> Problem appeared overnight. Worked fine last night before bed, and now
> refuses to function with morning coffee. Restarted everything, updated
> everything...
>
> —
> Reply to this email directly, view it on GitHub
> <#4161 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AUXM4BT5BQFE5NAYHYQTIZ3XLXBV3ANCNFSM5JA2I56Q>
> .
> You are receiving this because you commented.Message ID:
> ***@***.***>
>
|
Beta Was this translation helpful? Give feedback.
-
This solved it for me. For context, my connection was slow and it was throwing this error intermittently. |
Beta Was this translation helpful? Give feedback.
-
This is what Supabase Support told me: This might happen due to the connection being temporarily blocked by Supabase, see For the time my connection was blocked, I was able to use a VPN (Germany → USA → Supabase) to connect to the instance. After some while, I could then connect normally again. |
Beta Was this translation helpful? Give feedback.
-
Here's the error I found??? datasource db { I have, I think, tried everything!!!! |
Beta Was this translation helpful? Give feedback.
-
I had the same error and was able to solve it. |
Beta Was this translation helpful? Give feedback.
-
Run 'prisma migrate dev' and check if previewFeatures = ["multiSchema"] property needed in your schema.prisma file. |
Beta Was this translation helpful? Give feedback.
-
Create new password. Use only Letters either in capital or not. This solved this problem. |
Beta Was this translation helpful? Give feedback.
-
Get the Database URI from database settings. it will look like this You have to add "connect_timeout=300" in the end of the URI. This will fix it |
Beta Was this translation helpful? Give feedback.
-
Ha;ving the same issues. It was working fine last night and this AM getting the same types of errors. Changed my password and no luck still. |
Beta Was this translation helpful? Give feedback.
-
For people who are recently having this issue I have a fix for it. This is the message I found on Supabase dashboard > Project Settings > Database > URI Supabase have updated something behind the scenes and because of it the connection string is now a bit different. Just use the new one and you will be fine after you add the db password in it. |
Beta Was this translation helpful? Give feedback.
-
For me the default setting under "Connection pooling configuration" for my db was "Transaction mode", however for all Postgres features to work you need "Session". At least for me it fixed the issue. Also had to change connection string though. |
Beta Was this translation helpful? Give feedback.
-
After updating the database URL, the issue was fixed. However, receiving an alert whenever the database URL is updated would be helpful |
Beta Was this translation helpful? Give feedback.
-
Hi, I've configured my project using NextJS and Prisma as ORM and my connection strings look like this:
Then I tried to run this command to upload my current schemas from Prisma ORM but I still had this connection string error:
|
Beta Was this translation helpful? Give feedback.
-
Same here... since 2 or 3 weeks I think and in incomprehensible and irregular intervals.
|
Beta Was this translation helpful? Give feedback.
-
I managed to solve the error by running the migration script with bunjs, I tested it with several networks using bunjs and it worked on all of them regardless of the internet speed.
|
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
Quote from supabase:
I had to follow how to prepare for IPv6, I only needed to change my connection string. and everything works smoothly now |
Beta Was this translation helpful? Give feedback.
-
When runing
I'm using the new connection string I've attempted nearly all of the solutions offered in this thread. None of them worked. The only thing that enabled a successful build, is appending This is not ideal, so any ideas are appreciated. |
Beta Was this translation helpful? Give feedback.
Can you make sure your password doesn't have any weird characters in it like a
@
for instance? Also try connecting with a Postgres GUI client from your computer, something like TablePlus or BeeKeeper Studio.