7 months ago
On our dev env, my Postgres service is serverless. After a long sleep only (it works well with short ones), it will never wake up, whenever I query my service or connect with psql.
To address this, I tried a redeploy which triggers a useless migration (It seems to rerun the migration to the Bare Metal of May) from a region to itself (see screenshot).
When it doesn't fail, Railway tells me now I'm on a legacy region (in screenshot)
So I pressed the rollback button and it failed
I abviously begun by wiping the volume which just made it work once
But the next morning the sleep mode was broken again and trying to change it, the redeploy failed the same way as previously
So it seems I'm stuck in a hell loop between the Bare Metal and serverless mode due to :
The renaming of Bare Metal regions in regular regions ?
The redeploy trigger an outdated migration ?
Serverless mode failing
Hoping someone can get me out of it as it is totally blocking our ci / cd / review process
Thanks in advance !
65aff0db-6586-4be0-8420-b2e67ae4378d
18 Replies
I also just fully deleted the volume then recreated it which triggered the migration again instantly.
I know have a non serverless service working but still with the legacy warning displayed
Despite the awful experience, this has 3 main issues for me
I can't save money with the serverless mode
Does this warning means the Bare Metal discount doesn't exist anymore?
What will happen if I have to run a redeploy in production?

7 months ago
did you checked the region?
as per screenshot it seems that you're in legacy region.
i suggest to move to one of other region and check issue persists?
https://docs.railway.com/reference/deployment-regions
7 months ago
try disabling serverless.for databases i think it's not much useful, as most of the backend tries to keep persistent connection with their db.
Attachments
And it saves money when yoiu have environments with a db of 25GB so using a lot of RAM
btw I disabled serverless this morning and we struggle with unexpected migration steps at deploy when duplicating the env by creatin PRs
7 months ago
Gonna tag in the team!
But answering a few questions: You have been migrated to another host because there's some metal instances with degraded write/read performance (team is looking into it).
There's no more 'metal' tags in the region select, all regions there are metal regions by default.
7 months ago
!t
7 months ago
This thread has been escalated to the Railway team.
Status changed to Awaiting Railway Response medim • 7 months ago
7 months ago
I can confirm that the Postgres database in your dev environment is running on Railway Metal. Metal regions are no longer branded as "Metal" as they're now the default. Railway's old regions are instead labeled as "Legacy"
Status changed to Awaiting User Response Railway • 7 months ago
7 months ago
Please see the Serverless: "How it Works" section Docs for things that could be keeping your Postgres instance up at night: https://docs.railway.com/reference/app-sleeping#how-it-works
Since you have multiple services connected to your database, your database will not sleep if other services are sending requests to it.
I read it many times and had no issue making my services sleep when I wanted. The issue I recently had is that my PG service didn't wake up when receiving calls from my backend services or event directly connecting with psql
6 months ago
This thread has been marked as solved automatically due to a lack of recent activity. Please re-open this thread or create a new one if you require further assistance. Thank you!
Status changed to Solved Railway • 6 months ago

