title: 502 Bad Gateway with nginx | Google App Engine | Node JS
body: <p>I am hosting the web app on Google Cloud Platform with App Engine and I am using ExpressJS and MongoDB, which is hosted on mLab.</p>
  
  <p>Everything worked well until 1/1/2017. I had vm:true before and now was forced to change the env to flex. Now I am getting 502 bad gateway error with nginx. App engine doesn't allow us to change the nginx config file. </p>
  
  <p>I had tried the suggestion from this post: <a href="https://stackoverflow.com/questions/38012797/google-app-engine-502-bad-gateway-with-nodejs">Google App Engine 502 (Bad Gateway) with NodeJS</a> but still doesn't work.</p>
  
  <p>For some reason, I have another app with exactly the same setting on app engine and it works perfectly. </p>
  
  <p>Any suggestion will be greatly appreciated. Thank you. </p>