• vDerekS

    (@vdereks)


    Quite often when I update a blog post (using Elementor Pro), then clear the Autoptimize cache, a PHP process goes crazy, causes a >200% CPU load, and my site basically crashes. I have to reboot the entire VM to get my site back. Happens 95% of the time, if not more. Using the latest version of Autoptmize Pro. Been happening for quite some time (months).

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Optimizing Matters

    (@optimizingmatters)

    hey vdereks;
    We should first try to identify whether the problem is with the CSS/ JS cache (which is part of the free version of AO which I support here) or with the page cache (which is part of AOPro and which I can’t support here). Are you using AOPro page caching and if so does the problem go away when disabling that?

    frank

    Thread Starter vDerekS

    (@vdereks)

    I am NOT using page caching. Issue happens when clearing the JS/CSS cache. I’m not using JS optimizations, only CSS.

    • This reply was modified 7 months ago by vDerekS.
    Plugin Author Optimizing Matters

    (@optimizingmatters)

    OK, in that case this is an Autoptimize question and not an AOPro one so we can continue here ??

    Regarding the broader context; there is no need (or use) for clearing the AO JS/ CSS cache when updating a page/ post really ??

    Regarding the high CPU usage; how big is your JS/ CSS cache when this happens (number of files/ total size in MB)?

    Thread Starter vDerekS

    (@vdereks)

    Well it’s over 200MB and over 300 files.

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    that’s not a lot at all .. the “clear cache” logic is pretty straightforward and has not changed in years, so the question is what changed months ago to trigger this high CPU load.

    anyway, AO’s cache logic has an option to delete another way (with a rename instead of individual files being removed), you can trigger that advanced logic (which was built taking big cache sizes into account) by adding this code snippet;

    add_filter( 'autoptimize_filter_cache_clear_advanced', '__return_true' );

    maybe give that a try?

    Thread Starter vDerekS

    (@vdereks)

    Where/how do I add that?

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    The easiest & safest solution is using the code snippets plugin ??

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    So did this change fix the CPU load issue when clearing the cache @vdereks ?

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘High CPU when cache is cleared’ is closed to new replies.