Ed Cooper
El Presidente
Just Getting Started
Member Likes (0)
Anyone had any problems running the Memcached object-cache.php while using the Multi-DB plugin. For me it's getting mixed up with requests and redirecting some sites to other ones, also not letting some people log in etc. Using WordPress's inbuilt object cache seems to work fine so far, fingers crossed.
Note that Memcached is only supporting one instance of WordPress Multi-site over two servers, using Repcached to replicate Memcached data between servers. Never tested this before Multi-DB so no idea if it's that or a problem with data not being unique enough in Memcached. If anyone has any similar problems or knows of a solution I would love to hear it!

Responses (28)
People Person (joined February 2012) Likes (0)
Ed,
Welcome to WPMU! Thanks for visiting the forums!
I'm not familiar with your plugins, but I think I may have come across something that could help. I found this thread that has a couple of fixes and and links for Memcache users with a Multisite installation.
http://premium.wpmudev.org/forums/topic/memcache-for-multisite
I hope that you can find this useful :)
I leave this thread open for a bit longer, maybe someone else will come across with some other info :) If you find what you need in the thread above then please mark this as resolved by clicking the box below your comments.
Best Regards,
Kimberly
Member (joined January 2012) Likes (0)
Hi Kimberly,
Thanks for that but it's not helped. Feel free to remove it as a help request and more of an open thread for future users with the same issue. Maybe some day a solution will appear, but at the moment it seems impossible to use Memcached object cache on a Multi-Site network with more than one server replicating to each other.
Cheers,
Ed
People Person (joined February 2012) Likes (0)
Ed,
I've moved this to the Mulit-DB Support forum.
You will find more specialized help there, I'm sure. :)
Wish I could have done more.
Kimberly
People Person (joined February 2012) Likes (0)
Checking to see if you made any headway :)
I'll leave this in the Multi DB support forum for you.
Best,
Kimberly
Member (joined January 2012) Likes (0)
Thanks for moving it Kimberly. Still no luck unfortunately. We're running a similar set up to Edublogs server wise and it just doesn't seem to like reading and writing over multiple servers, even if you replicate between them.
People Person (joined February 2012) Likes (0)
I've got someone a little more familiar with Edublogs tagged to look in here, hope that helps!
Member (joined November 2011) Likes (0)
That would be great, thanks Kimberly!
Developer (joined September 2010) Likes (0)
I think http://mohanjith.net/blog/2008/10/using-memcached-with-wordpress-object-cache.html should help
PS: Sue asked me to share my two cents :)
Developer (joined September 2010) Likes (0)
Subscribing to thread
Member (joined January 2012) Likes (0)
Cheers mate. I'm pretty sure that was one of the things i tried previously. As far as I remember, it worked for about 10 minutes then it starts redirecting some blogs to other ones, like the key isn't unique enough. We currently have over 5000 blogs which are all accessed quite frequently.
We're running memcached (repcached) over two servers over WAN to keep servers in sync. Not sure if that is also causing issues. We chose WAN for redundancy, but it's causing some headaches scaling wise.
Developer (joined September 2010) Likes (0)
Can you please describe your setup to help you better?
Member (joined January 2012) Likes (0)
Both servers are identical running Ubuntu 10.04 with current versions of Nginx/PHP-FPM, Repcached, MySQL and Varnish.
Developer (joined September 2010) Likes (0)
Is this a single Multi site install? Which version of WordPress are you using?
Developer (joined September 2010) Likes (0)
Also which version did you first install? Can you post your wp-config.php after removing the sensitive information such as password and DB and memcache IPs/hostnames.
Thanks
Member (joined January 2012) Likes (0)
I was using the object-cache.php on just 1 Multi-Site installation WP 3.3.1. I initially tried it on more than one install and all blogs started redirecting to each other, but even on one it does the same thing.
wp-config.php - Replaced sensitive info with *, I've added the config options in from your post but not testing it again until this evening.
Member (joined January 2012) Likes (0)
define(ENABLE_CACHE, true); would be in there too...
Developer (joined September 2010) Likes (0)
Can you please add the following lines to wp-config.php?
I believe it should take care of your issue.
Member (joined January 2012) Likes (0)
I'll give it a go this evening and report back, many thanks for the help! Much appreciated.
Member (joined January 2012) Likes (0)
I've been told to tell you that we upgraded to 3.3.1. As far as we can recollect we initially used WPMU 2.8, upgrading to each version until the current one.
Member (joined January 2012) Likes (0)
Seems to be working well currently, will keep you updated. Thanks again. Could you explain why the blogid and siteid needed to be set?
Developer (joined September 2010) Likes (0)
You might have issues with the primary blog tables being missing. It would be an issue if you still have wp_1_options tables and no wp_options.
Without blogid and siteid in wp-config.php it's not possible to figure out the correct blog and site for global tables. Also it can cause more issues but seems you didn't have any other issues.
You should copy all wp_1_* tables to wp_* and you should be good for any further upgrades :)
Member (joined January 2012) Likes (0)
Ok cheers. We've now got a new problem! Load from php-fpm is spiking massively when using object-cache.php, using all php-fpm child processes. It does make all sites faster initially but then starts throwing errors via Varnish due to timeouts. Not sure if this is due to repcached or something else.
Developer (joined September 2010) Likes (0)
How far away are the two servers (in miliseconds) ? I had a similar issue because of repcached because the servers were ~100ms away. In such a senario using repcached is unnecessary.
Member (joined January 2012) Likes (0)
They're running at around 11ms to each other, only about 200 miles between them. I'll give it a go on bog standard Memcached then, see if I have the same issues.
Member (joined January 2012) Likes (0)
Still the same issue, it just ramps up to 100% usage across the board. We had a similar issue with memcached last night when someone had set sessions to use memcache instead of files. Started getting zend_mem_corrupt errors, disabling memcache fixed it immediately. Starting to wonder if my install of nginx/php-fpm just doesn't like memecached.
People Person (joined February 2012) Likes (0)
Ed Cooper,
I've been watching this thread and must say it's been fascinating!
But after getting this far I think that you might be better off getting a sysadmin to look at your database from here forward. It seems as if the support is getting a little deep, and that you need someone who can access all of your system to get the BIG picture :)
I hope that you do get the remainder of your issues solved and I look forward to seeing you around!
Best,
Kimberly
Member (joined January 2012) Likes (0)
I'll keep you updated if I find a fix for anyone else who has the same issue.
Thanks to all.
Member (joined January 2012) Likes (0)
Quick update, APC Object Cache is working fine.
Become a member