• Resolved Phuong Tong

    (@tvphuong41)


    The cache works very well with the article category, but the homepage doesn’t perform so well.
    The article pages send traffic and the host CPU load is very light, but the homepage is constantly at full CPU load even though it says the page is cached.
    VPS: Nginx
    Log error:
    2026/01/19 16:39:37 [error] 10362#10362: 9114 FastCGI sent in stderr: “PHP message: PHP Warning: Trying to access array offset on null in/wp-content/plugins/powered-cache/includes/dropins/page-cache.php on line 463” while reading response header from upstream, client: 3.89.116.106, server: .com, request: “GET / HTTP/2.0”, upstream: “fastcgi://unix:/var/run/.sock:”, host: “**.com”

    I checked the normal settings.

Viewing 10 replies - 1 through 10 (of 10 total)
  • Thread Starter Phuong Tong

    (@tvphuong41)

    The multisite website doesn’t have this error. I’ve tested it.

    Plugin Author Mustafa Uysal

    (@m_uysl)

    Hi @tvphuong41,

    Thanks for the details.

    That warning points to a corrupted/empty cache “meta” file being read by the page cache. In page-cache.php (around line 463), the code expects json_decode() to return an array, but it can return null (invalid/empty JSON), and then trying to read ['headers'] triggers:

    Trying to access array offset on null

    This is usually not the *root cause* of high CPU on the homepage, but it *can* cause extra PHP work and prevent proper cache delivery in some requests.

    Could you please try this first:

    1. **Purge Powered Cache completely** (clear all cache).
    2. **Delete the existing page-cache files** on disk so they can be regenerated (if your host allows it). In particular, remove the Powered Cache page-cache directory under wp-content/cache/ (only the Powered Cache cache folder, not other plugin folders).
    3. Hit the homepage a few times and re-check the Nginx error log to see if the warning comes back.

    If the warning keeps coming back, it strongly suggests something is writing an incomplete meta file (disk space / permissions / aggressive cleanup / another cache/security plugin interfering).

    Also, for the homepage CPU issue, please check if the preloader is enabled. If it is, try turning it off temporarily and observe whether there’s any change in CPU usage on the homepage. When the preloader is active, it crawls internal links, which can sometimes cause a CPU spike. Let me know the result so we can decide the next step.

    Thread Starter Phuong Tong

    (@tvphuong41)

    I cleared the cache and checked again, still the same problem
    log nginx
    2026/01/20 07:10:45 [error] 38223#38223: 216092 FastCGI sent in stderr: “PHP message: PHP Warning: Trying to access array offset on null in /var/www//data/www/.com/wp-content/plugins/powered-cache/includes/dropins/page-cache.php on line 463″ while reading response header from upstream, client: 3.89.116.106, server: .com, request: “GET / HTTP/2.0”, upstream: “fastcgi://unix:/var/run/.com.sock:”, host: “**.com”

    The articles are fine.
    I’m using PHP 8.5

    Check if the meta.php file is still there.

    Thread Starter Phuong Tong

    (@tvphuong41)

    For multisite projects, I’m using PHP 8.4.12 and it works normally.

    Plugin Author Mustafa Uysal

    (@m_uysl)

    Could you try downgrading PHP to 8.4 on the same setup and check if the problem still persists?

    I’m not sure this is directly related to the PHP version, as the log doesn’t provide much additional detail, but it would help rule that out quickly. Let me know the result.

    Thread Starter Phuong Tong

    (@tvphuong41)

    I just tried version 8.4 and still have the same error on the homepage; the VPS CPU is fully utilized, while the subpages have very good caching, only using about 40-50% CPU.

    I tested using https://loader.io/ to run 500 clients for over 1 minute.

    Plugin Author Mustafa Uysal

    (@m_uysl)

    There must be another reason why the homepage is not being cached. I recommend enabling debug mode https://docs.poweredcache.com/debug-log/ and checking the X-Powered-Cache-Miss-Reason header.

    You can also simply add

    define( 'POWERED_CACHE_MISS_REASON', true );

    to your wp-config.php file without enabling full debug mode, but I highly recommend using debug mode so you can clearly see what’s happening.

    Thread Starter Phuong Tong

    (@tvphuong41)

    I don’t understand why x-powered-cache has a value of Miss, even though I checked the files folder and there are cache files.

    I enabled debugging but didn’t see any errors.

    No settings exclude the homepage.
    Cache Footprint persists.

    I don’t see X-Powered-Cache-Miss-Reason.

    • This reply was modified 4 months, 2 weeks ago by Phuong Tong.
    • This reply was modified 4 months, 2 weeks ago by Phuong Tong.
    Plugin Author Mustafa Uysal

    (@m_uysl)

    I don’t understand why x-powered-cache has a value of Miss, even though I checked the files folder and there are cache files.

    If you haven’t enabled caching for logged-in users, it caches the page for non-logged but still you see miss since there is no cache to serve you.

    I enabled debugging but didn’t see any errors.
    No settings exclude the homepage.
    Cache Footprint persists.

    If the cache footprint persist, then is shouldn’t be a problem about caching the homepage. Are you %100 sure that Powered Cache causing the CPU usage? Have you monitored it on server side? And as I’ve asked before, are you using preloader and tried to disable it?

    Plugin Author Mustafa Uysal

    (@m_uysl)

    Hi @tvphuong41,

    I’m marking this topic as resolved. Let me know if you need further help.

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

You must be logged in to reply to this topic.