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

502nginxreverse-proxy53 replies · 445 views · started
  1. ok so pro tip: write down what u change. i didnt and had to redo 502 from scratch. @luckyworks what did u end up doing in the end

    5 0 helpful
  2. ok so for PHP-FPM, check its log for server reached pm.max_children setting. when all workers are busy, new requests queue and eventually fail. tune pm.max_children based on available RAM divided by average worker memory, not by guesswork. fingers crossed 🤞

    5 0 helpful
  3. oh also how is this thread still going lmao :)

    0 6 helpful
  4. yep

    2 0 helpful
  5. @tinysprite did u ever fix it?, ok this thread just saved my weekend

    1 0 helpful
  6. guys pls help lol this thread is gold im about to throw this thing out the window lol

    0 5 helpful
  7. told my boss it would take 10 minutes. its been 3 hours

    1 0 helpful
  8. idk man that sounds like bad advice tbh but hey ymmv

    0 3 helpful
  9. @amara.kowalski yesss added a healthcheck and depends_on sooo the app waits for the database, plus a restart policy, deploys no longer cause 502s. appreciate the checklist.

    2 0 helpful

Reply to this topic

Sign in or create an account to reply.