PHP Memory Leak Investigation
Memory usage climbs with every request until the PHP process is killed, or a long-running worker exhausts memory over time. I trace exactly what holds memory — static caches, unclosed resources, large result sets, or a loop that accumulates data.
What I Can Help With
Find what causes PHP memory usage to grow until the process dies.
Typical Problems
Relevant Experience
Tracked a memory leak in a long-running PHP worker at Cenoskop — a Symfony command that accumulated Doctrine entity references in a static cache over 12+ hours. Found it using tideways heap snapshots comparing memory at hour 1 vs hour 6. The fix was a 3-line change to detach entities after processing.
What Is Included
How It Works
You share memory usage data (or I add profiling for a sampling run). I compare heap snapshots at different points, find what's retained between requests or growing over time, and point at the exact code path. Most cases resolve in one focused session.
Starting from €399
Investigation and a written diagnosis with the fix location. Implementation is quoted separately.
Frequently Asked Questions
Is a memory leak in PHP ever just normal growth?
Yes. Frameworks and caches grow predictably per request up to a plateau. A real leak keeps climbing past the plateau until PHP-FPM kills the worker. I distinguish the two.
Can you find it without restarting PHP?
Yes. Memory profiling and heap snapshots let me see what's retained between requests without a restart.
Related Services
PHP Performance Optimization
Profile and optimize PHP applications that are slow, memory-heavy or consuming too much CPU.
Slow PHP Application? I'll Find the Bottleneck
Diagnose why a PHP application is slow, no rewrite required.
Backend Performance Audit
Find and prioritize the real bottlenecks across your full backend stack.
Systems I've Built
AnalyticsForWebsite
Custom solution for collecting and evaluating traffic metrics with emphasis on processing speed and minimizing backend load.
Designed and built the backend for fast traffic metric collection and evaluation.
Cenoskop / Levnobot
Crawler monitoring millions of products. Processing 30M products daily and comparing them.
Built and maintain the full crawling pipeline — from scraping through Elasticsearch indexing to price comparison.
Niftycent
Price intelligence engine for the US market. Processing large-scale product data.
Built the data pipeline and crawling infrastructure for large-scale US product monitoring.
Paidshield
Chat application with end-to-end encryption.
Built the backend and encryption layer for a secure chat application.
facha.sk
Find a job or offer your services.
Built the Go backend — API, matching logic and deployment.
Not sure what's wrong?
Write what's happening and paste anything relevant — errors, logs, metrics. I'll have a look and tell you what I think.