Slow at Peak Hours — Query Shape, OOM Kills and Gunicorn Workers That Never Clean Up
A Django app on nginx, gunicorn and MariaDB was slow every day at peak, and once in a while it went down. The first guesses were storage, CPU and a missing index. None held. The real causes were a query whose shape forced a join before a group, gunicorn workers that ballooned until the OOM killer took MariaDB, and crop code that forked child processes and never reaped them. Here are the read-only checks that proved each one.