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