Unable to access the Postgres database only from my App but can access from local machine
I'm seeking assistance regarding connectivity issues with a Postgres database. When deploying my application, as well as while it's in operation, I'm unable to access the Postgres database. However, I can access it from my local DB client using the same DATABASE_URL.
The project ID is a4502355-3a2e-4b1a-8423-538dbf6e55ec.
During the application's deployment, I attempt to execute a migrate using Prisma, but I'm encountering the following error, which halts the process:
Error: P1001: Can't reach database server at containers-us-west-XXXX.railway.app:XXXX.
The operating application also stops, which I suspect is due to the same issue (as the API times out). The application refers to the environment variable DATABASE_URL, which is set as ${{Postgres.DATABASE_URL}}.
The issue started around 13:00 JST on June 2, as I received inquiries from service users around that time.
Interestingly, I can successfully connect to the database when using the TablePlus client, which leads me to believe the DB is functioning normally. Yet, even if I copy the connection info from TablePlus and set it to the DATABASE_URL in the application's Environment Variables, and redeploy, the same error occurs. Based on these findings, it appears the DB is functioning normally, but for some reason, it's become inaccessible from the application server (and the deployment environment).
Could it be due to some sort of network migration? Could you please guide me on how to handle this situation?
78 Replies
Project ID:
a4502355-3a2e-4b1a-8423-538dbf6e55ec
you can always try a good old restart, the restart button is in the plugin settings
just a quick question too, did you recently upgrade to the dev plan?
OK, I'll try restart plugin.
No, I had upgraded to the dev plan over 1 year ago.
okay cool
Is it that you said?
yes
I restarted postgres plugin, but redeploy still failed...
And my App still stopped.
did it fail during build or during deployment
Maybe during build. Here is part of Build Logs that shows 'error command failed' (and hidden the real hostname)
There is additional log.
show me the table at the very top of the build
please no cropped screenshots again
It is top of the build. Correct?
oh dockerfile
would have been helpful to know that before hand lol
please send your dockerfile
OMG.
Here is my dockerfile!
I think I see the problem, what kind of app is this again though