I recently started using SendPulse.com for sending email campaigns to a list of thousands of recipients.
Sometimes my email campaigns have contained links, such as to a post on Facebook.
SendPulse is supposed to track which recipients click which links.
To do this, before sending out my email campaign, they replace the URLs in the message with URLs that go to their systems, which can record the tracking and then redirect the visitors to the real destination.
Unfortunately, these redirect links often do not work. We've frequently been seeing this error 502 Bad Gateway nginx/1.10.3 (Ubuntu)
:
Here is the HTML of that page:
<html>
<head><title>502 Bad Gateway</title></head>
<body bgcolor="white">
<center><h1>502 Bad Gateway</h1></center>
<hr><center>nginx/1.10.3 (Ubuntu)</center>
</body>
</html>
<!-- a padding to disable MSIE and Chrome friendly error page -->
It occurs to me that the root cause of the problem could be within SendPulse, CloudFlare (which we use for DNS), or Facebook.
We know it's not browser-specific, and we know that visitors from different parts of the world have experienced this problem.
It seems highly unlikely that CloudFlare¹ or Facebook would frequently throw this error.
Are there certain commands (maybe related to traceroute
?) that could identify who is throwing the error (SendPulse, CloudFlare, Facebook, or someone else)?
¹By the way, CloudFlare docs say: "If the error does not mention “cloudflare,” contact your hosting provider for assistance on 502/504 errors from your origin." But in CloudFlare, my subdomain is set to "DNS only" (gray cloud) instead of "Proxied" (orange cloud). I don't know whether these docs apply to a subdomain set to "DNS only".
If the link that occasionally fails is mysubdomain.mydomain.com/abc
, and if my CloudFlare DNS shows a CNAME entry for mysubdomain.mydomain.com
to point to track.stat-pulse.com
, then a screenshot of track.stat-pulse.com/abc
throwing the 502 error is (probably? Unless I'm misunderstanding something) enough to prove that the SendPulse servers are causing the error.