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:
HabrRelated stories
This article explores the classic N+1 query problem in Hibernate and methods for its optimization. The author notes that while JOIN FETCH and EntityGr…
REA: Let Your AI Agent Reverse Engineer the App Features You Wish You Had
REA is a new open-source tool designed to simplify the reverse engineering process by delegating tasks to AI coding agents. By functioning as both a C…
This tutorial provides a practical guide to building an AI-powered agent capable of analyzing SEC 10-K risk factor disclosures. Using TypeScript, the…


