Congratulations @hqraja for the very complete return !!
I would like to have clients as accurate as you π
I’ll probably going to have a workaround by doing $wpdb instead of get_option for the AO version, this should bypass the alloptions stale cache issue, hope to have this on github within an hour approx.
Hello @optimizingmatters
I created a simple php file that prints get_option('autoptimize_version')
Before the Redis update is activated, it displays 2.2.0.
I update AutoOptimize, the version in get_option displays good 2.3.0
so there is no version-issue @rvola?? I’m baffled … :-/
OK, commit done on Github, would love some people to test this by downloading and installing the zipfile from Github.
@optimizingmatters Yes I find a version 2.3.0 in get_options
I make an assumption, without having verified it, but I have already seen it so much that I am exposing it.
In a previous message, you say __return_false for the filter “autoptimize_filter_speedupper”.
Except that this file and its call are not absolutely not new between 2.2.2 and 2.3.X
The problem encountered (even on a server without Redis) is:
– Dedicated CPU load
– RAM memory out of stock
Do you check your regex? I noticed important changes to your commits of your regex.
A badly framed regex, often exhausts the CPU.
Can be redoing a review of your code between 2.2.2 and 2.3.0
-
This reply was modified 8 years, 5 months ago by
RVOLA.
the bulk of people who have the problem (which seems to be a minority given the amount of complaints + I have upgraded approx. 10 sites myself and the problem did not occur once) saw a huge amount of “cachebuster”-requests in their webserver logs, so this is definitively related to the cache being emptied automatically continuously.
the only part of AO that calls autoptimizeCache::clearall automatically is autoptimizeUpdateCode.php and the only reason that gets included & executed is if the version in the code (2.3.0) is different from the one in the database (well, it checks the major version actually 2.2 !== 2.3), which is why it occurred only upon the upgrade from 2.2 (which introduced “speedupper” which includes the cache preload) and 2.3. the filter you mention simply stops speedupper, which stops the cache being preloaded, stopping the high number of requests.
as (almost) everyone reporting this problem indeed is running redis or memcached to do object-caching, I’m 99% sure the root cause indeed is a stale value for autoptimize_version in the object cache somehow.
@optimizingmatters @rvola Anytime – happy to help! π
For any who are reading this, the GitHub update that @optimizingmatters just posted a few comments above fixes the issue for me. It’ll be great if others also try it out and report back.