5 months ago
Hello, I wanna ask why this server is crash and cant connect to db? I have request but why my db not active? I was make sure if the url db is correct, and 5 minutes ago I still can request to backend and when I made request again suddenly its cant. Is any something wrong on railway? please help me. thank u
14 Replies
5 months ago
is this because DB is in sleep mode?
5 months ago
Hey @Vivian, please don't ping the team as per the #🛂|readme. Your database should wake up even with private networking as per the docs. However, as mentioned in the caveats of serverless, in some extreme cases, you may need to rebuild your database to wake it up.
Slept services still consume a slot on our infrastructure, enabling Serverless de-prioritizes your workload and in remote cases, may require a rebuild to re-live the service.
The problem that i dont know is I can still access it from frontend in a few minutes before but when I want to access again it throw crashed suddenly even though Iam not work on backend or railway
I have restart the backend but havent try restart the db. I will try it
I access db from backend api via frontend, and the backend throw error
5 months ago
You'll likely need to add connection retry logic, the database will not wake up in a manner that any default connection code from prisma would like