Random 502 errors or CORS issues - Not all times

Our website and mobile app sometimes run into problems like 502 errors or CORS issues. It’s not happening all the time, but it pops up now and then. The backend, which is hosted on AWS Elastic Beanstalk for our Django app, seems fine. We’re trying to figure out why these issues keep popping up so we can fix them
1 Reply
Chaika
Chaika3mo ago
HTTP 502 is Bad Gateway, which is most of the time being returned from your origin to cause that response. If it doesn't reach your app, it won't have the CORS headers and would fail on CORS too. https://developers.cloudflare.com/support/troubleshooting/cloudflare-errors/troubleshooting-cloudflare-5xx-errors/#error-502-bad-gateway-or-error-504-gateway-timeout I am not AWS guy, but if they have any analytics on their side for errors or status codes, I would check there. If you have Pro or higher in Cloudflare, you can select Origin Status Code to filter by and try to see more of a pattern/more analytics about those requests:
Cloudflare Docs
Troubleshooting Cloudflare 5XX errors · Cloudflare Support docs
When troubleshooting most 5XX errors, the correct course of action is to first contact your hosting provider or site administrator to troubleshoot and …
No description