I have a php script that uses Doctrine2 and Zend to calculate some things from a database and send some emails for 30.000 users.
My script is leaking memory and I want to know which are the objects that are consuming that memory, and if it is possible who is keeping a reference to them (thus not allowing them to be released).
Im using php 5.3.x, so plain circular references shouldn't be the problem.
Ive tried using xdebug trace capabilities to get mem_delta with no success (too much data).
Ive tried manually adding memory_get_usage before and after the important functions. But the only conclusion that I got was that I loose around 400k per user, and 3000 users times that gives me the 1Gb that i have available.
Are there any other ways to know where and why memory is leaking? Thanks