https://supabase.com/ logo
#help
Title
# help
m

Manuel Coffin

04/03/2022, 8:28 PM
hey guys! I have this error that seems to come out of nowhere, I left my computer a few hours ago, and apparently now the connection to the database is not working:
Copy code
Can't reach database server at `db.<my-id>.supabase.co`:`5432`

Please make sure your database server is running at `db.<my-id>.supabase.co`:`5432`.
I saw some other people getting this, but didn't find a solution... Nothing has changed in my db configuration
n

Needle

04/03/2022, 8:28 PM
Hello @Manuel Coffin! This thread has been automatically created from your message in #843999948717555735 a ``few seconds ago``. Pinging @User so that they see this as well! Want to unsubscribe from this thread? Right-click the thread in Discord (or use the ... menu) and select Leave Thread to unsubscribe from future updates. Want to change the title? Use the
/title
command! We have solved your problem? Click the button below to archive it.
b

barry

04/03/2022, 8:30 PM
Could you send some code of how your connection is setup?
n

Needle

04/03/2022, 8:30 PM
manuelcoffin (2022-04-03)
m

Manuel Coffin

04/03/2022, 8:32 PM
Sure, I'm using prisma, this is my schema.prisma config:
Copy code
js
datasource db {
  provider = "postgresql"
  url      = env("DATABASE_URL")
}

generator client {
  provider        = "prisma-client-js"
  previewFeatures = ["fullTextSearch"]
}
and where I setup the db:
Copy code
js
const supabaseUrl = process.env.NEXT_PUBLIC_SUPABASE_URL || ""
const supabaseAnonKey = process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY || ""

export const supabase = createClient(supabaseUrl, supabaseAnonKey)
b

barry

04/03/2022, 8:34 PM
Seems right to me, let's see if an expert answers
m

Manuel Coffin

04/03/2022, 8:39 PM
Humm weird, I restarted my computer and now it works 🤷‍♂️