Postgres connection error after migration
I'm having an issue after migrating my postgres service, i'm getting "Error: P1001: Can't reach database server".
I successfully migrated the Postgres service, and can correctly see the migrated service.
I also updated my
DATABASE_URL
variable to use ${{Postgres.DATABASE_URL}}
on my backend service. There is no hardcoded references to the DB in my code and I'm not using .env files.
From there I'm getting the Error: P1001: Can't reach database server
when trying to run my api/backend service (which is running KeystoneJs fyi).
Any ideas on what the connection issue could be coming from?
Project ID b511c8ba-c047-4b52-809c-8e3fd5381b69
Solution:Jump to solution
can you try the solution proposed here? https://discord.com/channels/713503345364697088/1194241277517115443/1194568475071483944
7 Replies
Project ID:
b511c8ba-c047-4b52-809c-8e3fd5381b69
Solution
can you try the solution proposed here? https://discord.com/channels/713503345364697088/1194241277517115443/1194568475071483944
oh didn't see that issue posted in my search... can you just add the timeout into the
DATABASE_URL
variable as ${{Postgres.DATABASE_URL}}?connect_timeout=30&pool_timeout=30&socket_timeout=30
or is that something to add in the codebase?thats the correct way
perfect... that fixed the issue. thanks @Brody
no problem!