Can't reached DB
vivianazalia
FREEOP

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

vivianazalia
FREEOP

5 months ago

@Brody


yo
PRO

5 months ago

is this because DB is in sleep mode?


irazvan2745
FREE

5 months ago

try with the public db url


uxuz
MODERATOR

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.


vivianazalia
FREEOP

5 months ago

Yea but why db not auto wake up although I make a request?


vivianazalia
FREEOP

5 months ago

Oke sorry. I will try it


irazvan2745
FREE

5 months ago

are you using the username, password and such to connect to it?


vivianazalia
FREEOP

5 months ago

Yeaa, i copy url db from databasepublicurl


vivianazalia
FREEOP

5 months ago

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


irazvan2745
FREE

5 months ago

why would you access the db from the frontend?


vivianazalia
FREEOP

5 months ago

I have restart the backend but havent try restart the db. I will try it


vivianazalia
FREEOP

5 months ago

I access db from backend api via frontend, and the backend throw error


vivianazalia
FREEOP

5 months ago

And i realize the problem is from db


brody
EMPLOYEE

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


Loading...