Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

many http requests for /purge/tag/, slow response times #296

Open
bozzmedia opened this issue Feb 21, 2023 · 1 comment
Open

many http requests for /purge/tag/, slow response times #296

bozzmedia opened this issue Feb 21, 2023 · 1 comment

Comments

@bozzmedia
Copy link

bozzmedia commented Feb 21, 2023

After logging our http requests I noticed many urls containing /purge/tag or /purge/author/ with 2-4 second response times. Our page edits are slow to save and wondering if this may be part of the issue.

Example:

https://redacted.org/purge/tag/roger-redacted/feed/rdf/
	200 	0.8553 	23 hours
https://redacted.org/purge/tag/roger-redacted/feed/atom/
	200 	0.9721 	23 hours
https://redacted.org/purge/tag/roger-redacted/feed/
	200 	0.8625 	23 hours
https://redacted.org/purge/tag/roger-redacted
	200 	2.2739 	23 hours

I am trying to interpret Could this indicate an issue with enabling the auto purge on post updates? Is that a typical response time? Appreciate any insights, thanks!

16gb apache VPS, PHP 8.0, redis object cache, nginx page cache

@sashmarin
Copy link

sashmarin commented Jun 23, 2023

Seems similar to #257

I would suggest this fix. But the repository seems private, I can't commit.
In my test case it speeds up Wordpress post saving from 9 seconds to 2 seconds.

--- a/admin/class-purger.php
+++ b/admin/class-purger.php
@@ -460,8 +460,12 @@ abstract class Purger {
                 * @param string $url URL to be purged.
                 */
                do_action( 'rt_nginx_helper_before_remote_purge_url', $url );
-
-               $response = wp_remote_get( $url );
+                
+                $request_args = array(
+                    'blocking' => false,
+                    'sslverify' => false
+                );
+               $response = wp_remote_get( $url, $request_args );

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants