is it nginx or the spring boot app? a 502 mystery with one clue

Solved502nginxreverse-proxy91 replies · 1.7K views · started
  1. hmmmm not sure about that idk man that sounds like bad advice tbh

    thinking

    3 2 helpful
  2. ok so check what address the app binds to: ss -ltnp | grep 5000. if it listens on 127.0.0.1 but proxy_pass uses the servers LAN IP (or the other way around, or IPv6 [::1] vs 127.0.0.1 via localhost), nginx will get refused while your curl works.

    4 4 helpful
  3. been there man have u checked your 502 settings? lmao mine were reset after an update

    0 2 helpful
  4. gg

    5 0 helpful
  5. Accepted solution

    After deploys: if your process manager restarts the app and nginx hits it during the gap, youll see refused connections. Use a graceful reload (pm2 reload, gunicorn HUP, a rolling restart) or put two instances behind the upstream.

    4 4 helpful
  6. mods can we pin this thraed

    0 2 helpful
  7. hmmm honestly just reset teh fan curve and save yousrelf teh pain, this... so much this

    37 0 helpful
  8. hmmm make a backup before u touch teh firmware, learned that teh hard way

    2 0 helpful
  9. @sorent613 Raised the Spring Boot app keep-alive timeout above nginxs and enabeld upstream keepalive. Load test passed without a single 502. Thanks all! u guys are the best!!!

    11 0 helpful

Reply to this topic

Sign in or create an account to reply.