# Flask on Ubuntu 24.04: Why Your Simple Install Broke at 2 AM
It was 2:47 AM when the alert hit. Our uWSGI workers on the new Ubuntu 24.04 staging box had started swapping. Not throttling, not complaining, full memory-pressure swap thrashing that turned a simple health check into a 12-second GET request. Load average read 8.4 on a 2-core instance with 8GB RAM, and half of that was occupied by a dependency graph that should have been lightweight by design.
I opened the box and ran `pip freeze`. Forty-seven packages, for an application whose actual codebase spanned three files. The smoking gun was Werkzeug 2.3.x lurking alongside Flask 3.0.3, pulled in as a transitive dependency from some abandoned middleware package that had not been updated since 2022. Werkzeug 2.x is incompatible with Flask 3.x at the API layer. The import chain resolved to the wrong package. Nobody noticed until the OOM killer started writing to syslog.
This is not hypothetical. This is what happens when you treat dependency installation as ritual rather than engineering.
## The Architecture You Are Actually Installing







