Fixed My 502s Only During Traffic Spikes, And The Cause Was Embarrassingly Small

502nginxreverse-proxy53 replies 路 449 views 路 started
  1. not gonna lie this is driving me nuts my site has been running fine for months on Nginx in front of a Node app... now it falls over only during traffic spikes and all visitors get this:

    502 Bad Gateway

    502 Bad Gateway
    nginx
    

    restarting everything brings it back, until it doesn't. i'm not a full-time sysadmin, i set this up from a tutorial and it just worked. now i'm staring at log files i barely understand. which log should i look at first, and what am i looking for?? any ideas??

    22
  2. uhh what exactly does teh proxy error log say at the time of a 502? ??

    0 1 helpful
  3. @luckyworks nah thats not it, traffic has nothing to do with it idk maybe im wrong lol

    1 2 helpful
  4. respectfully disagree, i tried that and it made during worse.. 馃槀 told my boss it would take 10 minutes... its been 3 hours but hey ymmv

    2 9 helpful
  5. been there man honestly just reset the firmware and save yourself the pain fingers crossed 馃

    lol

    1 0 helpful
  6. @luckyworks what did u end up doing in teh end

    0 2 helpful
  7. my desktop is officially haunted 馃し for me it was teh cache. swapped it and boom, fixed

    1 0 helpful
  8. make a backup before u touch teh cache, learned that teh hard way good luck man!

    2 3 helpful
  9. lol same thing happened to me pro tip: write down what u change... i didnt and had to redo reverse-proxy from scratch

    1 0 helpful
  10. hmmm for me it was the driver, swapped it and boom, fixed fingers crossed 馃

    0 1 helpful
  11. Make the app restart itself: Restart=always in the systemd unit or restart: unless-stopped in Compose lmao Thats not a fix for the root cause, but it turns minutes of downtime into seconds while you investigate. lmk how it goes

    1 1 helpful
  12. ps i come back to this thread every week just for the drama

    1 0 helpful
  13. ok so bump... still happneing with nginx for me... which version are you on? hope that helps :)

    4 4 helpful
  14. wait what idk man that sounds like bad advice tbh

    5 2 helpful
  15. wait does this also apply to spikes? ?

    3 2 helpful

Reply to this topic

Sign in or create an account to reply.