502 Bad Gateway: три причины и куда смотреть

habrahabr.ru · world
Full story

A new case study, the seventh in a series, examines a 502 Bad Gateway incident. A release had been deployed overnight, and by morning the store was returning 502 errors even though systemctl status nginx showed active (running). The case illustrates why restarting nginx almost never fixes this problem. A 502 means nginx accepted the request and passed it on, but did not receive a normal response.

В прошлой статье я рассказывал, как устроен мой тренажёр инцидентов изнутри. Сегодня покажу один кейс, седьмой, про 502 Bad Gateway. Он небольшой, но на нём хорошо видно, почему рестарт nginx почти никогда не помогает. Вводная такая: ночью выкатили релиз, утром магазин отдаёт 502. При этом systemctl status nginx показывает active (running) . 502 значит, что nginx запрос принял, передал дальше и нормального ответа не получил. То есть nginx тут свидетель, и начинать надо с его лога: Читать далее

Read full article → Compare