I am calling update_options with a medium sized array (around 30k I guess) however I keep getting
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 274388 bytes) in /usr/www/users/username/example.net/wp-includes/cache.php on line 48
I have debugged my code and identified that the line update_option below is causing the problem.
$cache = array(serialize($result), "0.4.5"); update_option( 'widget_lwfcl-cache', $cache );
$result an array of strings which is 30k long. 0.4.5 is the version and stored as the second element of the array. This code results in the error shown above.
Now, if I replace the code above with
$cache = array("", "0.4.5"); update_option( 'widget_lwfcl-cache', $cache );
(correct me if wrong, but this should be 5 bytes long?)
I get EXACTLY the same error message, the same number of bytes exhausted and tried to allocate.
So what's going on here? Why did it just suddenly stop working. I have checked phpinfo and I have 32M to play with (as indicated in the error message), but I do not have access to php.ini and ini_set is disabled I believe. How can I fix this, or is my data just too large?