R
R
Roman2016-10-31 11:38:24
PHP
Roman, 2016-10-31 11:38:24

How to debug memory leaks in php?

Hello. There is a demon that spins in an eternal cycle (the doctrine is used there, maybe it doesn’t clean up something). Tell me, can there be any tools for debugging memory leaks? Or how do you find leaks?

Answer the question

In order to leave comments, you need to log in

5 answer(s)
F
Fractal Zombie, 2016-10-31
@FractalZombie

Isn't it easier to raise a normal demon? https://daemon.io

G
Grigory Esin, 2016-10-31
@xotey83

Forgive me moderators, but once this answer helped me: stackoverflow.com/a/36288686

A
Alexey Skobkin, 2016-10-31
@skobkin

doctrine is used there, perhaps it does not clean up something

Do you clean up the Identity Map ?
And surely some XDebug is not included?
In general, you need a profiler. Above one has already been suggested. There are also xhprof and blackfire.io .

A
Alexander Kubintsev, 2016-10-31
@akubintsev

Logging at the first stage is necessary with fixing the size of the used memory. At the second stage, when at least some localization of the problem area will be, really use the profiler.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question