Technologies
Back
Software Development & Open Source

One SoapFault — and the PHP garbage collector is disabled forever. A memory leak story

Habr
Advertisement468 × 90
One SoapFault — and the PHP garbage collector is disabled forever. A memory leak story

The authors share their experience investigating a mysterious memory leak in a PHP queue consumer that frequently crashed with an OOMKilled error. Although Kubernetes automatically restarted the pod, the issue required a permanent fix. Deep analysis revealed that a specific SoapFault was causing the PHP garbage collector to disable itself under certain conditions. This led to the accumulation of circular references and gradual memory exhaustion. The article details the debugging process, the use of profiling tools, and the identification of the problematic code snippet. The authors demonstrate how even a minor error in exception handling can lead to critical consequences for application stability. This case serves as an excellent lesson on memory management in PHP and the importance of conducting deep analysis of runtime behavior when encountering non-standard errors.

This is a summary. Read the full article at the original source:

Habr
Advertisement468 × 90
Share
Software Development & Open Source

Related stories

Advertisement970 × 250