meijin
meijin
RRailway
Created by meijin on 7/10/2024 in #✋|help
Can't reach PostgresQL database. "too many clients alreadyconnection to server"
No description
6 replies
RRailway
Created by meijin on 6/2/2023 in #✋|help
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?
98 replies