hey guys! I have this error that seems to come o...
# help
m
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
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
Could you send some code of how your connection is setup?
n
manuelcoffin (2022-04-03)
m
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
Seems right to me, let's see if an expert answers
m
Humm weird, I restarted my computer and now it works 🤷‍♂️