WP Super Cache not working when http3 enabled
-
I use nginx-quic to enable http3/quic, if I access the site directly using http3, it says WP Super Cache is not enabled, but if I access the site the same way using http2(disable quic in chrome), the WP Super Cache works normally.
-
Hi @ztom – I’d like to start by apologizing for not getting back to you before. Unfortunately we have received an unusual amount of support requests, which is delaying our response time, and we generally answer in the order received. I would like to assure you that this is not a common occurrence and we are doing our best to get up-to-date. I sincerely appreciate your patience.
Regarding your issue, we are working to check the source of the problem and will be back as soon as we have an update.
Hi @ztom,
That’s strange. I don’t have direct experience with nginx-quic, but I don’t know of any reason why it would affect WP Super Cache. I have a few questions to understand more about what you’re seeing, and your setup:
- You mention that WP Super Cache is not enabled when using http3-quic. Do you mean that it appears deactivated in the wp-admin interface when viewed through http3, or are you checking for the HTML comments that WP Super Cache adds to your page footer for confirmation?
- Is the same nginx service also serving HTTP/2 pages when accessed over that protocol?
- What “Cache Restrictions” setting do you have enabled in the Advanced settings of WP Super Cache? I wonder if there is a difference in the cookies / auth token between HTTP/2 and 3.
Finally, would you be willing to enable debug mode to capture some debug logs while viewing your site via http3? There may be details in there, such as a message about why WP Super Cache is not serving cached versions of certain pages. We have instructions for Debug mode here: https://github.com/Automattic/wp-super-cache/wiki/How-to-enable-debug-mode
If you’d like our help interpreting your debug logs, feel free to post them here – but please make sure they don’t contain any private information such as your site’s URL or any relevant user details before posting them.
Yeah. That’s strange. I see the plugin is deactivated in admin panel. And I use the same nginx to provide http2. My cache restrictions setting is: enable cache for all visitors.
I guess this might be caused by php? nginx-quic is built with boringssl but php is openssl.
I’ll create a new site to see if I can reproduce this this week.
Let us know what you find!
Hi, now it can be reproduce by access https://quictest.vtp.xyz/
Hi there,
Could you share debug logs with us for the new test site? We have instructions for Debug mode here:?https://github.com/Automattic/wp-super-cache/wiki/How-to-enable-debug-mode
Feel free to post the logs here so we can have a look. Thanks!
wp_cache_get_cookies_values: cached: f4826c90d614770daaab87cd4b05dcc9
04:01:20 2576697 / Cookies found. Cannot serve a supercache file. f4826c90d614770daaab87cd4b05dcc9
04:01:20 2576697 / wp_cache_get_cookies_values: cached: f4826c90d614770daaab87cd4b05dcc9
04:01:20 2576697 / In WP Cache Phase 2
04:01:20 2576697 / Setting up WordPress actions
04:01:20 2576697 / Created output buffer
04:01:20 2576697 / wp_cache_get_cookies_values: cached: f4826c90d614770daaab87cd4b05dcc9
04:01:20 2576697 / wpsc_is_caching_user_disabled: false
04:01:20 2576697 / Output buffer callback
04:01:20 2576697 / wp_cache_get_cookies_values: cached: f4826c90d614770daaab87cd4b05dcc9
04:01:20 2576697 / wpsc_is_caching_user_disabled: false
04:01:20 2576697 / Writing non-gzipped buffer to wp-cache cache file.
04:01:20 2576697 / Renamed temp wp-cache file to ABSPATH/wp-content/cache/supercache/quictest.vtp.xyz/wp-cache-4ed53f6208bfb714c8cc51a9ac936e06.php
04:01:20 2576697 / Sending buffer to browser
04:01:20 2576697 / wp_cache_shutdown_callback: collecting meta data.
04:01:20 2576697 / Writing meta file: ABSPATH/wp-content/cache/supercache/quictest.vtp.xyz/meta-wp-cache-4ed53f6208bfb714c8cc51a9ac936e06.php
04:01:22 2576684 / wpsc_is_caching_user_disabled: false
04:01:26 2576768 / wpsc_is_caching_user_disabled: falseHi @ztom,
Thanks for the link to your site site and some of your logs.
I’ve taken a look at your test site, and have noticed some interesting errors at the top of the page when fetched via quic:
Warning: Undefined array key “host” in /www/wwwroot/quictest.vtp.xyz/wp-includes/canonical.php on line 689
That suggests that your web server (nginx/quic) isn’t properly reporting your hostname / URL to PHP when it’s running WordPress – which may explain why WP Super Cache is unable to cache pages properly.
I’ve also examined your log – unfortunately, there isn’t quite enough there to illuminate exactly what’s going wrong here.
wp_cache_get_cookies_values: cached: f4826c90d614770daaab87cd4b05dcc9
The first line appears to be cut off – but it appears to see that you have a login cookie present.
What happens if you try to access your site in “incognito mode”, with no login cookies present? Do the DEBUG logs still show a line like the above with a hex value? If so, it may be possible that nginx is adding a cookie to your requests, though that would be strange.
Would it be possible to generate a longer DEBUG log dump, including:
- Loading a page in incognito mode / with no login cookie, twice
- Loading your frontpage when logged into your WordPress site, and finally
- Loading your frontpage with quic disabled in your browser, so that I can see the difference?
Thanks for bearing with us while we try to get to the bottom of this; this is a new and strange problem from my perspective.
14:10:20 2576691 / wpsc_is_caching_user_disabled: false
14:10:20 2576691 / wp_cache_get_cookies_values: return:
14:10:20 2576691 / supercache dir: ABSPATH/wp-content/cache/supercache/quictest.vtp.xyz/
14:10:20 2576691 / wp_cache_get_cookies_values: return:
14:10:20 2576691 / Fetched static page data from supercache file using PHP. File: ABSPATH/wp-content/cache/supercache/quictest.vtp.xyz/index-https.html
14:10:24 2576690 / wpsc_is_caching_user_disabled: false
14:10:30 2576696 / wpsc_is_caching_user_disabled: false
14:10:40 2576688 / wpsc_is_caching_user_disabled: false
14:10:40 2576688 / wp_cache_get_cookies_values: Login/postpass cookie detected
14:10:40 2576688 / wp_cache_get_cookies_values: return: 01abc8d22d19efafd85cb29185e23acc
14:10:40 2576688 / supercache dir: ABSPATH/wp-content/cache/supercache/quictest.vtp.xyz/
14:10:40 2576688 / wp_cache_get_cookies_values: cached: 01abc8d22d19efafd85cb29185e23acc
14:10:40 2576688 / Cookies found. Cannot serve a supercache file. 01abc8d22d19efafd85cb29185e23acc
14:10:40 2576688 / wp_cache_get_cookies_values: cached: 01abc8d22d19efafd85cb29185e23acc
14:10:40 2576688 / In WP Cache Phase 2
14:10:40 2576688 / Setting up WordPress actions
14:10:40 2576688 / Created output buffer
14:10:40 2576688 / wp_cache_get_cookies_values: cached: 01abc8d22d19efafd85cb29185e23acc
14:10:40 2576688 / wpsc_is_caching_user_disabled: false
14:10:40 2576688 / Output buffer callback
14:10:40 2576688 / wp_cache_get_cookies_values: cached: 01abc8d22d19efafd85cb29185e23acc
14:10:40 2576688 / wpsc_is_caching_user_disabled: false
14:10:40 2576688 / Writing non-gzipped buffer to wp-cache cache file.
14:10:40 2576688 / Renamed temp wp-cache file to ABSPATH/wp-content/cache/supercache/quictest.vtp.xyz/wp-cache-77cef4520ace7ab0dcd2b8ccb5143fca.php
14:10:40 2576688 / Sending buffer to browser
14:10:40 2576688 / wp_cache_shutdown_callback: collecting meta data.
14:10:40 2576688 / Writing meta file: ABSPATH/wp-content/cache/supercache/quictest.vtp.xyz/meta-wp-cache-77cef4520ace7ab0dcd2b8ccb5143fca.php
14:10:45 2576687 / wpsc_is_caching_user_disabled: false
14:10:49 2576692 / wpsc_is_caching_user_disabled: falseHey there,
My apologies for the delay in replying. I shared the logs with our developers. We’ll be in touch as soon as we have their insight. Thank you!
Hi @ztom,
Thanks for posting your logs. Picking through them, I can see two distinct requests – however, I can’t tell for sure which are done via quic and which isn’t.
Here’s request one:
14:10:20 2576691 / wpsc_is_caching_user_disabled: false 14:10:20 2576691 / wp_cache_get_cookies_values: return: 14:10:20 2576691 / supercache dir: ABSPATH/wp-content/cache/supercache/quictest.vtp.xyz/ 14:10:20 2576691 / wp_cache_get_cookies_values: return: 14:10:20 2576691 / Fetched static page data from supercache file using PHP. File: ABSPATH/wp-content/cache/supercache/quictest.vtp.xyz/index-https.html
Here’s request two:
14:10:40 2576688 / wpsc_is_caching_user_disabled: false 14:10:40 2576688 / wp_cache_get_cookies_values: Login/postpass cookie detected 14:10:40 2576688 / wp_cache_get_cookies_values: return: 01abc8d22d19efafd85cb29185e23acc 14:10:40 2576688 / supercache dir: ABSPATH/wp-content/cache/supercache/quictest.vtp.xyz/ 14:10:40 2576688 / wp_cache_get_cookies_values: cached: 01abc8d22d19efafd85cb29185e23acc 14:10:40 2576688 / Cookies found. Cannot serve a supercache file. 01abc8d22d19efafd85cb29185e23acc 14:10:40 2576688 / wp_cache_get_cookies_values: cached: 01abc8d22d19efafd85cb29185e23acc 14:10:40 2576688 / In WP Cache Phase 2 14:10:40 2576688 / Setting up WordPress actions 14:10:40 2576688 / Created output buffer 14:10:40 2576688 / wp_cache_get_cookies_values: cached: 01abc8d22d19efafd85cb29185e23acc 14:10:40 2576688 / wpsc_is_caching_user_disabled: false 14:10:40 2576688 / Output buffer callback 14:10:40 2576688 / wp_cache_get_cookies_values: cached: 01abc8d22d19efafd85cb29185e23acc 14:10:40 2576688 / wpsc_is_caching_user_disabled: false 14:10:40 2576688 / Writing non-gzipped buffer to wp-cache cache file. 14:10:40 2576688 / Renamed temp wp-cache file to ABSPATH/wp-content/cache/supercache/quictest.vtp.xyz/wp-cache-77cef4520ace7ab0dcd2b8ccb5143fca.php 14:10:40 2576688 / Sending buffer to browser 14:10:40 2576688 / wp_cache_shutdown_callback: collecting meta data. 14:10:40 2576688 / Writing meta file: ABSPATH/wp-content/cache/supercache/quictest.vtp.xyz/meta-wp-cache-77cef4520ace7ab0dcd2b8ccb5143fca.php
Looking at the logs, one case is logged in and the other is not. This would normally account for a difference in what is or isn’t cached. Was one of these loaded when logged in, and the other in “incognito” mode?
I recommend testing with both quic and without quic in “incognito mode” to ensure that login cookies don’t play a role in the results you see.
Hi there,
It has been more than two weeks since we have heard from you, so I’m marking this topic as resolved.
But if you have any further questions or need some more help, you’re welcome to reply here or open another thread.
I suffer the same behavior when quic is activated the options gets disable, even if its functional,
The only solution right now is tho disable the experimental quic on your browser
By example on Chrome
Open Google Chrome. In the URL address type chrome://flags and press enter then type quic into Search flags field to filter the list of flags.
Select Disabled from the drop-down menu next to Experimental QUIC protocol
Hi @nuevaya,
Could you please start your own thread, as per the Forum Welcome?
https://www.ads-software.com/support/plugin/wp-super-cache#new-postThank you!
- The topic ‘WP Super Cache not working when http3 enabled’ is closed to new replies.