Finding Memory Leaks
Posted: Mon Sep 17, 2007 5:23 pm
Hi Forum,
I've written an import script for a bigger image database. The script iterates over 20000 database entries and as much
lines of csv file, creates some object and updates all database entries. All in one big for-loop.
My problem is that every loop takes about 20k extra memory eating up all memory I feed it.
I tried to debug it using "get_defined_vars()" but it returns every time the same amount of variables. (I think this is because
get_defined_vars only returns accessible variables.)
Now I'm a little out of options. What can I do to find the root of the problem? Is there a way to output _every_ memory eating bastard
or to access the symbol-tables directly and look for stuff which shouldn't be there? Or are there any php memory debuggers which could
help me?
Help would be very much appreciated.
Best regards
PePa
(PS: Please forgive me if this is the wrong forum but I think the question goes well deep.)
I've written an import script for a bigger image database. The script iterates over 20000 database entries and as much
lines of csv file, creates some object and updates all database entries. All in one big for-loop.
My problem is that every loop takes about 20k extra memory eating up all memory I feed it.
I tried to debug it using "get_defined_vars()" but it returns every time the same amount of variables. (I think this is because
get_defined_vars only returns accessible variables.)
Now I'm a little out of options. What can I do to find the root of the problem? Is there a way to output _every_ memory eating bastard
or to access the symbol-tables directly and look for stuff which shouldn't be there? Or are there any php memory debuggers which could
help me?
Help would be very much appreciated.
Best regards
PePa
(PS: Please forgive me if this is the wrong forum but I think the question goes well deep.)