Answer the question
In order to leave comments, you need to log in
PHP - Out of memory - where does the memory go?
There is a script that throws Out of Memory during operation - it is clear that somewhere something is not released.
How can you determine where? How can I see which variables take up how much memory space at the time of the error?
Xdebug help?
Answer the question
In order to leave comments, you need to log in
I recommend memtrack . Allows you to display line by line who ate what. If it's a cron, it's better to call the gc_collect_cycles collector instead . And check that the garbage collector is enabled at all.
memory_get_usage but it will only show the memory usage.
unset() in the right place can do a lot.
XDebug will help and a lot of luck.
First of all, I would pay attention to recursive functions and resource-intensive queries to the database.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question