Memory limit acting weird

Hello all.

Here is my question:

I’m a developer in a a very large system and occasionally I use [php]ini_set(‘memory_limit’, ‘4G’);[/php] in some export functions. The problem being that when running this scripts, they crash with memory limit exhausted!

If I set the limit to 2GB, they work fine.

Since the code is versioned and this only happens to me, I don’t want to change the code. I would prefer to simply fix my system for it to work with 4GB.

My test system is a virtualbox machine with 4GB ram running debian with nginx and php-fpm.

Any ideas why this happens? 4GB crashes and 2GB limit works?

Could it be some other limit is hit? ( One in the OS forinstance )

4Gb… is a lot! :wink:
Good luck finding out. May I ask to report it if you found the problem, I’m curious about this.
Thanks.
O.

Found a “fix”.

Moved to a new virtual machine that runs a 64 bit Debian install. The machine still has 2GB allocated, but no error now.

Sponsor our Newsletter | Privacy Policy | Terms of Service