We are hosting one of our website on AWS, deployed successfully without any error but sometimes for some unknown reasons it shows “BAD GATEWAY” , unable to figure out why it is so. In this case, we manually again deploy it and everything goes to normal, but the thing is we can not afford it as the website is on production and it is hampering our product. Any suggestion why this is happening. Is anyone out there experiencing the same issue? Please help me out with this.
Also, I want to confirm whether it is happening because of the following situations -
a) AWS EC-2 instance stop/start/restart
b) Memory issue
It sounds like it’s running behind a proxy (nginx, apache, passernger, other load balancer), is that right?
Usually bad gateway means the proxy didn’t get an answer from the upstream (the Meteor app). Which either means it’s crashed, overloaded or busy working on a long running task on the main thread
Take a look at the logs for both your Meteor app and for the proxy to see which isn’t taking to the other properly
If you can track the number of restarts for the app too, that could help
Just checked it there are some in-app consoles and one error regarding meteor method. Meteor method failed because we recently changed our mail-server and email related configuration process.env.MAIL_URL is pointing out to something older one.
oh god is it? Pretty new to me, need to consider it as a priority work. Hope so fixing this will work as we are having two environments one is for production and one is test. Production have only phase-1 development and test is having phase-1&2. Can not pull data from git though, I guess I can manually edit the file. Thank you for the help.