Why Your PHP App Crashes at late at night (and How We Fixed It by Removing __destruct() from 17 Services)

At 2:nearly half a.m., PagerDuty screamed: “`PHP Fatal error: Allowed memory size of 536870912 bytes exhausted` — 12x spike in `FatalErrorException` on `/api/v2/checkout`.” It was our Black Friday launch — $4.2M in carts stalled, payment gateways tim...