Support » Fixing WordPress » Caching problem / wp_cache_init() error / blank screen

  • Resolved Peter Kirn

    (@peterkirn)


    Since upgrading to 3.0.4, I’ve had sporadic issues. Now, I can’t get the site to load at all – wp-admin, main page, nothing.

    Server logs show wp_cache_init errors on each page load; e.g.,
    2011/01/03 01:02:40 [error] 13253#0: *1757 FastCGI sent in stderr: “PHP Fatal error: Call to undefined function wp_cache_init() in /home/noise/wp-includes/load.php on line 378” while reading response header from upstream, client: 82.242.74.54, server: noisepages.com, request: “GET / HTTP/1.1”, upstream: “fastcgi://unix:/dev/shm/php-fastcgi.sock:”, host: “createdigitalmotion.com”, referrer: “http://www.google.com/reader/view/”

    I’m running nginx + APC.

    I have tried disabling the MySQL query cache and APC caching temporarily to see if those were somehow conflicting (based on previous comments) — nothing.

    Also, I tried doing a clean install of WP in a separate directory and switching to that. That fixed everything — for about fifteen minutes, and then the problem resurfaced (which *really* says to me there’s a caching problem!)

    I would think that disabling the WP cache would resolve the issue, right? Shouldn’t I be able to choose —

    define(‘WP_CACHE’, false);

    — in wp-config.php?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter Peter Kirn

    (@peterkirn)

    FYI, to avoid conflicts, I have temporarily disabled both MySQL query cache (my.cnf — set query cache size to 0) and APC (disabled the module in php.ini)…

    So that still seems to me that it’s WP’s internal cache; why else would I be getting wp_cache_init() called at all?

    Thread Starter Peter Kirn

    (@peterkirn)

    Correction —
    Restarting php-fpm appears to, at least temporarily, correct the problem. I think maybe my APC setting didn’t conflict before?

    I’ve seen APC issues boil down to one or two lines of code. Is there a simple diff WP devs maintain for 3.0.4 so I can see if I can track down a change that could possibly have triggered (or worsened the symptoms of) one of these APC wrinkles? I know WP users have been bitten by APC before(!)

    Thread Starter Peter Kirn

    (@peterkirn)

    I can confirm that the older version of APC, 3.0.16, can cause this issue. It appears that it either surfaced out of the blue or, more likely, as a result of a change to a file in the WP 3.0.4 upgrade. I consider the issue resolved, but will investigate what specific change may have cause the problem and if the newer build of APC is compatible.

    Thread Starter Peter Kirn

    (@peterkirn)

    For anyone having the issue, additional notes that may be useful:
    1. Look for apc.php, and move it to a web-served directory, in order to check the active version (and other helpful info).
    2. You’ll find the apc enable flag in php.ini to disable it.
    3. If you’re using php-fpm as I am, you need to restart the php-fpm daemon in order for the module to fully deactivate. (easy to forget to do!)

    It seems that other people are having issues with APC not fully updating.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Caching problem / wp_cache_init() error / blank screen’ is closed to new replies.