• Resolved Halkotron

    (@halkotron)


    I’ve been trying to configure my WordPress site to use Batcache along with Memcached object-cache.php drop-in, but so far without luck. To elaborate a bit:

    1. I’ve used a clean 3.9.1 installation
    2. installed Memcached plugin [ww.wp.xz.cn/plugins/memcached/], copied object-cache.php to wp-content/ directory, and set define('WP_CACHE', true); in wp-config.php
    3. installed Batcache plugin [ww.wp.xz.cn/plugins/batcache/], copied advanced-cache.php to wp-content/

    Net result is, the site fails to load with Notice: Undefined offset: 1 in /path/to/site/wp-content/object-cache.php on line 374 for users that aren’t logged in.

    When I try to use the newer Memcached Redux plugin [ww.wp.xz.cn/plugins/memcached-redux/], site fails to load with
    Fatal error: Call to undefined function wp_cache_init() in /path/to/site/wp-content/advanced-cache.php on line 203, again only for anonymous users.

    The only other object-cache plugin I’ve tried that didn’t break the site is the Xcache object backend plugin [ww.wp.xz.cn/plugins/xcache/], but I’d really prefer using Memcache due to multi-server environment I’m using. For what it’s worth, these two seem to be working well together, I get Batcache’s stats before </head> and everything.

    Is there something I’m forgetting, or is there currently no way of using Batcache with Memcache caching backend? Is there a current ‘best’ practice to exploit Memcache?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter Halkotron

    (@halkotron)

    Actually, nevermind. The Memcache backend was acting up, hence the Memcache object cache plugin responded in weird ways. Nothing to see here.

    How was your Memcache backend acting up? I’m running into the same issue and it’s literally driving me insane!

    Thread Starter Halkotron

    (@halkotron)

    It was an issue unrelated to WordPress – I still haven’t been able to figure out what exactly was going wrong.

    Our setup is serveral memcache servers behind a nutcracker proxy [ https://github.com/twitter/twemproxy ], based on memcache stats WordPress was able to store objects/views in memcache, but had problems accessing them. We’ll be rolling out consistent hashing soon and see whether that takes care of the problem.

    For now the XCache backend works fine as an alternative.

    Thanks for the quick reply. Looks like I’ll be looking into XCache.

    Looking through my server logs, we recently updated our version of Memcached and I think that may be the issue, but I’ve stepped a bit outside my comfort zone. 😉

    I figured out my issue. I was trying Memcached Redux and had memcached installed on the server, but not the PECL extension, so PHP wasn’t recognizing the class. I did have the memcache PECL extension installed, but not memcacheD.

    Then once that was working, I found that I was having a white screen on all other domains after one domain loaded correctly, so I found out that I needed to set the WP_CACHE_KEY_SALT to something unique for each site.

    Now everything works great for me.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Batcache with memcache backend’ is closed to new replies.