my script, serializing a large array was working without problems on PHP 5.3.8 with APC. My server crashed I installed PHP 5.3.10 with APC and I get following error.
Allowed memory size of 31457280 bytes exhausted (tried to allocate 262263 bytes).
I increased memory_limit to 256M in php.ini. On same script I verified with PhpInfo() and it is showing 256 MB. However I get the same error message. I disabled APC, and same error message again.
Well, its pretty clear that 31457280 bytes is 30 MB, therefore the limit has not been increased, so i’d check that again.
To make this answer more useful, you should probably be looking at serialising this large array in batches, as its never a good idea to hog so much memory at one time.
Also, you should probably look into igbinary since the native way PHP stores and serialises array is very poor and memory inneficient