Status : 502 error.(Unable to load)

Hi All, I am getting following error message while doing any task in UI- Unable to to load Service/xas/status:502 After this error, I get the expected result when I refresh the page There are no errors in server logs. By the way, I'm accessing this application from all the the browser. Anyone encountered this or can anyone suggest a solution for this please.
2 answers

We were finally able to figure out what was causing this problem and address it. Below is the answer we found for the solution if anyone else runs into something like this in the future. Mind you, we’re working in a private cloud solution.


Here's a small breakdown of what seems to be causing the 502s:

  1. Mendix uses a keepalive connection during which it barrages Nginx with 100+ requests 
  2. Our Nginx has version 1.19.9 setup on ALL affected clusters
    1. Nginx has keepalive_requests parameter, which sets the maximum number of requests that can be served through one keep-alive connection
    2. Version 1.19.9 has keepalive_requests set to 100(refer back to point 1 to figure out where i'm going with)
  3. So, whenever you start working on mendix app, it creates a keepalive connection and after reaching 100 requests the connection is closed
  4. That leads to the error developers are seeing in the UI and dev tools

How to fix - 

  1. Run kubectl edit cm nginx-ingress-ingress-nginx-controller -n kube-system
  2. Add keep-alive-requests: "1000" under data
  3. Run kubectl rollout restart deploy nginx-ingress-ingress-nginx-controller -n kube-system to have ingress restart and pick up updated configmap
  4. Verify that 502 error is gone.

Links -

Best of luck!


Does your app actually run? I most cases when you get a 502 error, the application is stopped and you cannot reach it as a result.