The MU forums have moved to WordPress.org

WPMU and Memcached (4 posts)

  1. Brukhar
    Member
    Posted 13 years ago #

    Hey guys,

    I'm having an issue with WPMU, W3TotalCache, memcached and object-cache.php

    I'm on WPMU 2.9.2.
    W3 Total Cache version: 0.8.5.2

    Server Specs:
    Xeon 3460
    8 GB DDR3
    2x500GB SATAII
    1gbit connection
    Apache 2.2.15

    Essentially, my admin pages on WPMU aren't working when memcached caching is enabled, and data/statistics are displaying from one WPMU site on the other. (See screenshot here: http://i43.tinypic.com/242ic6s.jpg )

    Here's a better description of the error:

    Step 1. I install W3TotalCache.
    Step 2. I activate W3TotalCache site-wide.
    Step 3. I enabled caching and configure http://creativefan.com/ to use W3TC with memcached for all caching methods.

    At this point, the plugin is working great.

    Step 4. I enable caching and configure http://design.creativefan.com/ to use W3TC with memcached for all caching methods.

    At this point, if I click 'dashboard' on CreativeFan, it displays some information from design.creativefan.com and some from creativefan.com (as indicated by the aforeshown screenshot). However, design.creativefan's wp-admin is correct.

    Step 5. If I clear all caches on design.creativefan.com, the wp-admin for creativefan.com starts working again. (clearing the cache for creativefan.com itself at this point does nothing)

    At this point, creativefan.com's wp-admin is correct, but now design.creativefan.com is showing information from fan.creativefan.com (which is an unused test blog at this point, and does not have w3tc installed).

    Step 6. If I clear all caches on creativefan.com, the wp-admin for design.creativefan.com starts working again. But then it reverts to the error where creativefan.com itself is showing data from design.creativefan.com

    At this point, I can get stuck in a back-and-forth of emptying the caches of one WPMU site to make the other start working, but in the process, it messes up the backend of the site I'm currently on.

    This error only occurs with the master 'admin' account, subaccounts don't experience this problem (at least that I have been able to replicate). I had theorized that either:
    1. W3TC and memcached was somehow caching the database queries for the statistics, etc (because it didn't consider them part of the admin). But I have W3TC set to not cache pages for logged in users, so I'm not sure.
    2. Something was messed up in the backend of my WPMU installation itself. However, this issue completely disappears if I disable W3TC on both sites, empty the caches, then uninstall W3TC.

    ==============================================================

    If I change to disk caching, this admin problem disappears, but another error appears (it might occur during memcached too but I haven't gotten to test it). The error is that when I publish posts or add/remove widgets, the changes don't take effect. Sometimes I will publish, the post will go live, then 5 minutes later the post will disappear and I have to republish. I resolved this error by renaming object-cache.php to object-cache.php.bak, so it was no longer being used.

    Here's the object-cache.php file contents: http://pastebin.com/3QM5uN3N

    So, right now I'm using W3TC with Disk Caching, and all is well (my host is currently installing eAccelerator, which hopefully will help improve performance).

    Does anyone know a solution or what the problem might be with memcached for this error? Is memcached worth it (the reason I need something to help is because my server has issues with Digg's front page surge)? What is the performance difference between eAccelerator, memcached and XCache, and can you use one or more in conjunction?

    Thanks.

  2. miklb
    Member
    Posted 13 years ago #

    I'm looking for some tips myself on how to have memcached running with multiple instances of WPMU installs.

    Even if I'm only enabling it for only one of the installs, the other one wants to redirect to the instance where memcached is being used. meaning, if I have it enabled on example.com, but not example-2.com, example-2.com will start redirecting to example.com. Removing the

    `global $memcached_servers;
    $memcached_servers = array('default' => array('127.0.0.1:11211'));`

    from the config and restarting memcached clears up the issue.

    I'm testing with Ryan's plugin and latest dev version of WP Super Cache.

  3. fredericktownes
    Member
    Posted 13 years ago #

    Does anyone know a solution or what the problem might be with memcached for this error? Is memcached worth it (the reason I need something to help is because my server has issues with Digg's front page surge)? What is the performance difference between eAccelerator, memcached and XCache, and can you use one or more in conjunction?

    Only one opcode cache can be used at once. Use memcached only if you have multiple servers or other specific reasons for it. The nature of your issue appears to be related to the use of object-cache.php, which is an unknown quantity. You're mixing together various levels of caching without focusing on addressing a specific problem. It's not really necessary for in many scenarios.

  4. fredericktownes
    Member
    Posted 13 years ago #

    I'm testing with Ryan's plugin and latest dev version of WP Super Cache.

    Ok. I added the WP Super Cache tag to this post so you can get some help for that.

About this Topic

  • Started 13 years ago by Brukhar
  • Latest reply from fredericktownes