PySpark OOM Error: Driver vs Executor Memory Triage & Production Remediation
The definitive engineering triage guide to diagnosing and fixing Apache Spark OutOfMemory (OOM) crashes. Demystifying driver heap exhaustion from collect() vs executor container kills (Exit code 137), broadcast hash join thresholds, shuffle skew, Adaptive Query Execution (AQE), and off-heap memory overhead.