Forums

HTTP 502 - Bad Gateway

I’ve been getting HTTP 502 - Bad Gateway errors on and off for the last couple of days. I don’t believe this is related to my code, is this related to the issues you’ve posted on X (formerly known as Twitter)?

Can you post more information? I’m unclear about if there are several separate issues, or just one issue that’s been hard for you to troubleshoot.

Here’s the full error text:

`Something went wrong :-( Something went wrong while trying to load this site; please try again later.

Debugging tips If this is your site, and you just reloaded it, then the problem might simply be that it hasn't loaded up yet. Try refreshing this page and see if this message disappears.

If you keep getting this message, you should check your site's server and error logs for any messages.

Error code: 502-backend`

Let us know when you were getting the errors and when you were not and we'll see if that corresponds with when we were having issues.

Event, Date-Time UTC), Reason, Duration (in mins.)

Up, 8/4/23 15:16, OK, 526

Down, 8/4/23 14:41, Bad Gateway (502), 35

Up, 8/2/23 21:38, OK, 2462

Down, 8/2/23 19:20, Connection Timeout, 138

Up, 8/2/23 18:27, OK, 53

Down, 8/2/23 17:57, Bad Gateway (502), 30

Up, 8/1/23 23:47, OK, 1090

Down, 8/1/23 23:27, Bad Gateway (502), 20

Up, 8/1/23 22:22, OK, 65

Down, 8/1/23 21:38, Connection Timeout, 43

Up, 8/1/23 21:16, OK, 23

Down, 8/1/23 20:56, Bad Gateway (502), 20

Up, 8/1/23 16:45, OK, 250

Down, 8/1/23 16:43, Connection Timeout, 3

Up, 8/1/23 16:30, OK, 13

Down, 8/1/23 16:20, Bad Gateway (502), 10

Data source: automatically monitored/collected by uptimerobot.com for the domain https://dialapodcast.com

Hope that helps, and let me know what else I can provide!

Are you seeing any corresponding 502s in the access logs for the app?

Yes, I am seeing 502 in the access log, as well as 499. Here's a snipped of the access log from the first occurrence, start with the the last successful access and ended when the service returned to normal. I've left the IP addresses for services (UptimeRobot and TwilioProxy), but anonymized them for non-service access. Let me know if you'd like other examples (or complete log sets) from other instances as well:

208.115.199.21 - - [01/Aug/2023:16:14:45 +0000] "HEAD / HTTP/1.1" 200 0 "https://dialapodcast.com" "Mozilla/5.0+(compatible; UptimeRobot/2.0; http://www.uptimerobot.com/)" "208.115.199.21" response-time=0.319

54.158.249.62 - - [01/Aug/2023:16:17:35 +0000] "POST /config/phone/answer/ HTTP/1.1" 502 1661 "-" "TwilioProxy/1.1" "54.158.249.62" response-time=0.001

54.161.17.112 - - [01/Aug/2023:16:17:39 +0000] "POST /config/phone/webhook/ HTTP/1.1" 502 1661 "-" "TwilioProxy/1.1" "54.161.17.112" response-time=0.000

208.115.199.21 - - [01/Aug/2023:16:19:45 +0000] "HEAD / HTTP/1.1" 502 0 "https://dialapodcast.com" "Mozilla/5.0+(compatible; UptimeRobot/2.0; http://www.uptimerobot.com/)" "208.115.199.21" response-time=0.000

208.115.199.21 - - [01/Aug/2023:16:20:05 +0000] "GET / HTTP/1.1" 502 1661 "https://dialapodcast.com" "Mozilla/5.0+(compatible; UptimeRobot/2.0; http://www.uptimerobot.com/)" "208.115.199.21" response-time=0.000

xxx.xxx.xxx.xxx - - [01/Aug/2023:16:21:06 +0000] "GET / HTTP/1.1" 499 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36 Edg/114.0.1823.37" "xxx.xxx.xxx.xxx" response-time=1.753

xxx.xxx.xxx.xxx - - [01/Aug/2023:16:22:23 +0000] "GET / HTTP/1.1" 499 0 "-" "Mozilla/5.0 (iPhone; CPU iPhone OS 16_5_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.5.2 Mobile/15E148 Safari/604.1" "xxx.xxx.xxx.xxx" response-time=60.001

xxx.xxx.xxx.xxx - - [01/Aug/2023:16:23:08 +0000] "GET / HTTP/1.1" 499 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36 Edg/114.0.1823.37" "xxx.xxx.xxx.xxx" response-time=121.848

xxx.xxx.xxx.xxx - - [01/Aug/2023:16:23:11 +0000] "GET / HTTP/1.1" 499 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36 Edg/114.0.1823.37" "xxx.xxx.xxx.xxx" response-time=1.604

54.162.240.30 - - [01/Aug/2023:16:25:33 +0000] "POST /config/phone/answer/ HTTP/1.1" 499 0 "-" "TwilioProxy/1.1" "54.162.240.30" response-time=39.992

208.115.199.21 - - [01/Aug/2023:16:25:35 +0000] "GET / HTTP/1.1" 499 0 "https://dialapodcast.com" "Mozilla/5.0+(compatible; UptimeRobot/2.0; http://www.uptimerobot.com/)" "208.115.199.21" response-time=29.995

54.167.242.94 - - [01/Aug/2023:16:25:43 +0000] "POST /config/phone/webhook/ HTTP/1.1" 499 0 "-" "TwilioProxy/1.1" "54.167.242.94" response-time=30.034

xxx.xxx.xxx.xxx - - [01/Aug/2023:16:29:18 +0000] "GET / HTTP/1.1" 200 3660 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/115.0" "xxx.xxx.xxx.xxx" response-time=154.102

Yes, that does line up with the times that we were having issues. One of our storage servers is showing intermittent issues (which we're still digging into to find out the underlying cause). The data itself is not at risk, but the system that serves it up to the other servers where your code runs is having problems. Your data is stored on that server, so when we have issues, you'll see 502 errors.

Things seem stable now...have you found (and quashed) the bug?

We're still working on it.