I just spent 30 minutes trying to figure out why memcache was giving me max_execution errors. I killed the locking and that got rid of the errors, but I noticed memcache wasn't working.
The problem is very simple in the documentation, and it looks like a change from the previous version to RC-1. Before, and as stated in the documents you set:
$conf['cacherouter'] = array(
'default' => array(
'engine' => 'db',
'server' => array(),
'shared' => TRUE,
'prefix' => '',
'path' => 'sites/default/files/filecache',
'static' => FALSE,
'fast_cache' => TRUE,
),
);
In the memcacheClasss constructor it looks for 'servers' rather than 'server', so if you aren't running memcache on a localhost:11211 it won't connect:
if (isset($options['servers'])) {
$this->settings['servers'] = $options['servers'];
$this->settings['compress'] = isset($options['compress']) ? MEMCACHE_COMPRESSED : 0;
$this->settings['shared'] = isset($options['shared']) ? $options['shared'] : TRUE;
}
else {
if (isset($default_options['servers'])) {
$this->settings['servers'] = $default_options['servers'];
$this->settings['compress'] = isset($default_options['compress']) ? MEMCACHE_COMPRESSED : 0;
$this->settings['shared'] = isset($default_options['shared']) ? $default_options['shared'] : TRUE;
}
else {
$this->settings['servers'] = array('localhost:11211');
$this->settings['compress'] = 0;
$this->settings['shared'] = TRUE;
}
}
I would suggest putting something on the project's page about this and advise people to just change their config setting to 'servers'=>. Grammatically that seems a lot better since you can have more than 1 server.
Comments
Comment #1
elliotttf commentedI believe this is a duplicate of this issue I posted a month ago: #586188: Change 'server' to 'servers' in README.txt. It would be nice for it to be addressed sooner rather than later though so people don't have to spend time reading through the code like you and I did to solve the problem.
Comment #2
andypostgoing to #586188: Change 'server' to 'servers' in README.txt