PHP APC Potential Cache Slam Averted for Key

I'm receiving this error while trying to use apc_store(). I googled it and saw that this was APC timebomb bug and saw some fixes which suggested adding apc.slam_defense = Off; to php.ini.

I need to know whether this has happened because of a programming error, and if yes, how to fix it.

This is the code segment:

if ($data = apc_fetch("foo")) {
    $an_array = $data;
} else {
    /* couple of lines */

    apc_store("circles", $an_array); // This is where I get the error
}

This script will be called frequently in my deployed system.

I hope I've provided enough info

Thanks in advance

25
задан shyam 13 February 2011 в 09:13
поделиться