CloudFlare + Heroku - intermittent "welcome to nginx" page or 503 error

I implemented CloudFlare recently for several Rails apps I host on Heroku. Just this week a couple users have reported being sent to a “Welcome to Nginx” page or a 503 error page when trying to access these apps. We have tried for a couple days but cannot reliably recreate the problem. Sometimes clearing browser cookies fixes the problem and sometimes it seems to make it worse.

Internet searches and searching CloudFlare documentation hasn’t produced any good information - at least that we can find. Has anyone experienced anything like this? Thanks in advance!

The tip has some suggestions and links to the relevant documentation, Community Tip - Fixing Error: 503 Service Unavailable / Service Temporarily Unavailable. And, the Support link at the top of this site will link to the help center docs. If you’re still seeing the issues, I’d start by collecting a trace from an affected machine.

Hi Mike,

Based on your ticket, it sounds like you were able to solve this yourself, by removing the A records that were automatically generated for origin at Heroku.

Being a shared hosting platform, it’s best to rely on the CNAME DNS record targets at Heroku, as opposed to pointing your domain to the A records, which are shared among other websites.

If you continue to have issues here, please let us know in your ticket, so we can address them promptly.

1 Like