I'm having a PHP script that's running fine on my development server (Linux Debian Squeeze 64-bit, PHP 5.3), according to memory_get_peak_level()
it's roughly consuming about 13M of memory.
When I run the same script on a production server (also Debian, PHP 5.3) I sometimes get a fatal out of memory error as the script is trying to allocate more than 256M (the limit that has been set in memory_limit
), reproducable. It's a database driven application (MySQL) and I mirrored the database to ensure it's not the data that's causing trouble.
Are there any good strategies to find out, why it's consuming more than 10 times more memory? What could be possible causes for that? Can it be the ioncube extension I'm using on the live server?