New edge router - App failed to respond after deployment

ricardomacario
PRO

a year ago

Hi Railway team,

During the legacy router incident, I switched to the new router to mitigate the downtime.

Now I'm facing the issue that after I deploy, I get the Railway "Application failed to respond" for about 30 seconds. After, I'm able to load the app successfully.

I haven't made any changes to the health check endpoint, and it used to work without problems on the previous router. Traffic was switched to the new instance without problem.

How can I solve the problem? I can't have 30s downtime every time I deploy.

Solved

9 Replies

a year ago

Hello!

I checked the DNS for both those domains, and while the www subdomain is correctly resolving to our new Edge Proxy, your root domain is set to a fixed A record.

You've pinned yourself to the Legacy proxy that has this slow routing issue.

I'm seeing that you are using digital ocean to manage your DNS, they don't support root CNAMEs, you would need to use CloudFlare's nameservers going forward!

tl;dr Your DNS is setup incorrectly and you will need to use CloudFlare's nameservers to remedy this.


Status changed to Awaiting User Response Railway 11 months ago


ricardomacario
PRO

a year ago

Hi Brody, like always, thank you so much for the response. You're the BEST!

Got it. Once I switch to CloudFlare's nameservers do I need to do anything on the Railway side?


Status changed to Awaiting Railway Response Railway 11 months ago


a year ago

Always happy to help!

I'd recommend removing and re-adding the domains so Railway can issue certs again.

Be sure to use the random CNAMEs Railway gives you instead on your service domain!


Status changed to Awaiting User Response Railway 11 months ago


ricardomacario
PRO

a year ago

Understood.

At what time would you recommend doing this? I would need a fairly fast customer support in case something goes wrong because it would bring the app down completely.

Before doing it, I will also try with another domain just to make sure everything goes smoothly before doing it for my production app.


Status changed to Awaiting Railway Response Railway 11 months ago


a year ago

I'm around, if you need even faster replies for the duration of this switch over you can open a slack channel in your account settings!


Status changed to Awaiting User Response Railway 11 months ago


ricardomacario
PRO

a year ago

Thanks Brody. So I'm trying it with a different domain: ricardomacario.com

I added that Domain to CloudFlare.

I deployed a new project on railway. Project ID: 1cd7fce0-3f7f-40e8-9a8e-77deeae5a8d1
Railway URL for the project: https://nextjs-approuter-shadcn-production-2aa0.up.railway.app/

I added the custom domain to the project.

Now, if I go to the domain: https://ricardomacario.com/ I'm getting a "redirected you too many times." error.

What could be causing that?


Status changed to Awaiting Railway Response Railway 11 months ago


a year ago

This would - https://docs.railway.app/guides/public-networking#provider-specific-instructions

Sorry for not mentioning it sooner, it had slipped my mind.


Status changed to Awaiting User Response Railway 11 months ago


ricardomacario
PRO

a year ago

Awesome that solved it

I know this doesn't fall on Railway side and I need to read more on it.

But is there anything extra that Cloudflare does by default that I should be aware? Like maybe caching my request on their CDN by default? I don't want this to happen to API routes.

(I'll do some research between switching the production app)


Status changed to Awaiting Railway Response Railway 11 months ago


a year ago

I don't have much experience in actually using Cloudflare, so I wouldn't be able to answer that to the level you deserve.

But maybe you could enable developer mode to completely disable cache, then you could look into it further?


Status changed to Awaiting User Response Railway 11 months ago


Status changed to Solved echohack 2 months ago