Support forwards complaints: some of the shop's customers cannot open their orders, and the cart takes seconds to load. You check the site the usual way — the home page opens at once. Compare that with what nginx wrote to its log.
Check the site and its log
Request the home page, look at the last three lines of access.log and count how many answers with each code the log holds.
First, predict
The home page answered 200 in a few thousandths of a second. What will counting the codes in access.log show?
Now start the exercise, run the command and compare your prediction with the output.
curl got 200 from the home page, and access.log holds hundreds of 5xx answers. What follows from this?
-
curl sent one request and printed the code of its answer — 200. The 5xx answers in the log belong to other requests.
-
The lines are fresh: the last ones in
sudo tailcarry today's time, and new ones appear every second. -
nginx sends no requests of its own: it writes answers to clients into access.log, and the lines carry the clients' addresses and browsers.
The customers' requests got the 5xx, and curl's single request was among the good ones.