Serverless Postgres do not wake up and redeploy fail
jclaveau
PROOP

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

Solved

18 Replies

jclaveau
PROOP

7 months ago

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?

1408019929449369600


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


jclaveau
PROOP

7 months ago

Yes I did I have no Bare Metal region in the list

1408028833721876500


jclaveau
PROOP

7 months ago

but bare metal regions do not exist anymore on non db services


jclaveau
PROOP

7 months ago

service id: 65aff0db-6586-4be0-8420-b2e67ae4378d


rasesh-here
HOBBY

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


jclaveau
PROOP

7 months ago

I use serverless for DB for more than a year without issue


jclaveau
PROOP

7 months ago

And it saves money when yoiu have environments with a db of 25GB so using a lot of RAM


jclaveau
PROOP

7 months ago

btw I disabled serverless this morning and we struggle with unexpected migration steps at deploy when duplicating the env by creatin PRs


jclaveau
PROOP

7 months ago

so disabling serverless is definitelly not enough


jclaveau
PROOP

7 months ago

@Duchess is it normal the Bare Metal regions disappeared?


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


jclaveau
PROOP

7 months ago

Thank you for reporting it 🙏


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.


jclaveau
PROOP

7 months ago

Ok so I guess this message is buggy and I should just click "looks good"

1408385146587185200


jclaveau
PROOP

7 months ago

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


Railway
BOT

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


Loading...