• Resolved kosmicare

    (@kosmicare)


    Since deactivating wordfence and then re-activating it this problem has stopped, but I’m worried that it could come back, since I don’t know the original cause.

    Using the plugin “Log HTTP Requests” I was seeing a request to this URL about once per minute.

    /wp/wp-admin/admin-ajax.php?action=wordfence_testAjax

    The requests take between 10-45 seconds (usually 10 or 11). My site was drastically slower than normal.

    Does anyone know of a possible cause for this?

    ### Security ###
    
    Secure connection (HTTPS): ✔
    Hide errors from visitors: ✔
    
    ### Active Plugins (34) ###
    
    Add Reference Field to BACS: by Reagent Tests UK / WPCodeLibrary.com – 1.0
    Change Default Checkout Box Text: by Reagent Tests UK – 1.0
    Theme Functions Changes: by Reagent Tests UK – 1.0
    Mailing List Checkbox: by WebAware Pty Ltd – 1.0
    Ask Me: by Timo Schiller
    Alexander Siemer-Schmetzke – 0.5
    
    Autoptimize: by Frank Goossens (futtta) – 2.8.3
    GDPR Cookie Consent: by WebToffee – 2.0.1
    CryptoWoo HD Wallet Add-on: by Trustless Technologies GmbH – 0.10.7
    CryptoWoo Monero Add-on: by We Program IT | legal company name: OS IT Programming AS | Company org nr: NO 921 074 077 – 1.0.7
    CryptoWoo: by Trustless Technologies GmbH – 0.25.23
    Disable Cart Fragments: by Optimocha – 1.21
    Site Kit by Google: by Google – 1.29.0
    Log HTTP Requests: by FacetWP
    LLC – 1.2
    
    Post SMTP: by Yehuda Hassine – 2.0.22
    WooCommerce Product Feed for Google, Awin, Shareasale, Bing and More: by ExportFeed.com – 3.3.0.3
    Redirection: by John Godley – 5.1.1
    Scripts-To-Footer: by Joshua David Nelson – 0.6.4.1
    Advanced Shipment Tracking for WooCommerce: by zorem – 3.2.2.4
    Woo EDD Email Domain Blacklist: by Md. Kowsar Hossain – 2.0.0
    Friendly User Agent for WooCommerce: by Blaze Concepts – 1.2.0
    WooCommerce Blocks: by Automattic – 4.8.0
    Woo Payment Discounts: by WPCodelibrary – 1.3.0
    WooCommerce Opayo Form and Direct Gateway: by Andrew Benbow – 4.9.0
    WooCommerce Google Analytics Pro: by SkyVerge – 1.10.0
    Advanced Order Export For WooCommerce (Pro): by AlgolPlus – 3.1.8
    WooCommerce Order Status Manager: by SkyVerge – 1.13.2
    WooCommerce Xero Integration: by WooCommerce – 1.7.37
    WooCommerce: by Automattic – 5.1.0
    Wordfence Security: by Wordfence – 7.5.2
    WP Crontrol: by John Blackbourn & contributors – 1.10.0
    WP-Lister Pro for Amazon: by WP Lab – 1.9.4
    WP Mail Logging: by MailPoet – 1.9.7
    WP Activity Log: by WP White Security – 4.2.1
    WP Super Cache: by Automattic – 1.7.2
    
    ### Inactive Plugins (0) ###
    
    ### Dropin Plugins (1) ###
    
    advanced-cache.php: advanced-cache.php
    
    ### Settings ###
    
    API Enabled: ✔
    Force SSL: ✔
    Currency: GBP (£)
    Currency Position: left
    Thousand Separator: ,
    Decimal Separator: .
    Number of Decimals: 2
    Taxonomies: Product Types: external (external)
    grouped (grouped)
    simple (simple)
    variable (variable)
    
    Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog)
    exclude-from-search (exclude-from-search)
    featured (featured)
    outofstock (outofstock)
    rated-1 (rated-1)
    rated-2 (rated-2)
    rated-3 (rated-3)
    rated-4 (rated-4)
    rated-5 (rated-5)
    
    Connected to WooCommerce.com: ✔
    
    ### WC Pages ###
    
    Shop base: #7 - /shop/
    Basket: #8 - /cart/
    Checkout: #9 - /checkout/
    My account: #10 - /my-account/
    Terms and conditions: #19708 - /terms-conditions/
    
    ### Theme ###
    
    Name: Storefront
    Version: 3.5.1
    Author URL: https://woocommerce.com/
    Child Theme: ❌ – If you are modifying WooCommerce on a parent theme that you did not build
    personally we recommend using a child theme. See: How to create a child theme
Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support wfphil

    (@wfphil)

    Hi @kosmicare

    Wordfence scans run in short stages called forks. The “wordfence_testAjax” request is a test to see if the scanner can successfully send a request back to WordPress. If the test passes then the scanner will start a new scan fork.

    When you said, “The requests take between 10-45 seconds (usually 10 or 11)” – please provide a screenshot link showing this using an image sharing service. You may be misinterpreting what you are seeing.

    When you said, “My site was drastically slower than normal.” – please provide a precise and detailed description as Wordfence may not be involved and may have been a coincidence of timing. You have a lot of active plugins installed on your e-commerce website so something else may possibly be the cause.

    Have you tested activating Wordfence again and running test manual scans?

    Thread Starter kosmicare

    (@kosmicare)

    Unfortunately the items have now moved out of the HTTP request logs. Here is an example of some requests:

    https://i.imgur.com/rH78Vj6.png

    I’m quite confident that the requests were taking that long, since that is the information being presented. I am willing to be corrected though.

    Loading any page on the site was taking much longer than normal to load. Where normally the homepage loads in 0.6 seconds, requests were taking 10.4 seconds or thereabouts.

    Given the coincidental occurrence, and coincidental duration matches, you can probably see why I think wordfence is involved (true that it may not be the cause).

    As mentioned in the post, I deactivated and reactivated Wordfence and the problem has resolved itself, so I am more thinking about future prevention. Maybe it was just a one off bug and it won’t happen again though.

    Plugin Support wfphil

    (@wfphil)

    Hi @kosmicare

    Thank you for the update but your screenshot doesn’t show any “wordfence_testAjax” requests.

    I don’t think Wordfence is involved as Wordfence should not slow a website down at all, and the issue is no longer present with Wordfence active.

    When testing if a plugin is the cause of a problem then it is best to always test deactivating and activating that plugin several times to see if the problem really only exists when the plugin is active. This enables you to rule out a coincidence of timing.

    Thread Starter kosmicare

    (@kosmicare)

    Hi Phil, thanks for your response. As mentioned in my previous post, the logs are finite and at the time you requested to see them, the incident in question was no longer in them. I did state that I was providing the screenshot as an example of what the logs look like, to demonstrate that they are indeed showing a measure of time.

    My understanding of this is that a hanging request delays the page load until the request returns a result. I know this can happen (to any plugin which makes requests) because I have seen it in the past with another plugin (no longer installed).

    As I also mentioned in both my previous posts, I did deactivate Wordfence and the problem disappeared. As I mentioned in my previous posts, the problem did not re-appear again afterwards.

    As I mentioned in my previous post, I am thinking about future prevention. It seems that you don’t recognise the request I mention, or what it does, which is fine, perhaps it was indeed a one off. We will have to leave it unresolved, I will return someday if it ever happens again.

    • This reply was modified 3 years, 7 months ago by kosmicare. Reason: added conclusion
    Plugin Support wfphil

    (@wfphil)

    Hi @kosmicare

    Thank you for the update.

    I installed the Log HTTP Requests plugin and I couldn’t replicate what you were seeing.

    The “wordfence_testAjax” request is a test to see if the scanner can successfully send a request back to WordPress. If the test passes then the scanner will start a new scan fork.

    If you run a manual scan you will see the “wordfence_testAjax” requests again.

    If you have no site speed issues when a Wordfence scan is running then it is likely to be something else.

    If it happens again then test deactivating and activating Wordfence several times to see if the problem really only exists when Wordfence is active. Be mindful that this is an intermittent issue and you won’t know how long the site will be slow for. If the site is slow for a long enough time for you to test deactivating and activating Wordfence several times then this will enable you to rule out Wordfence if the site is slow when it is inactive.

    Thread Starter kosmicare

    (@kosmicare)

    Thanks Phil, that’s very helpful and gives me a way to manually trigger the request.

    View post on imgur.com

    You can see that 1 hour ago there was a slow request but it successfully returned a 200 response instead of timing out.

    Upon manually triggering the scan (time since triggered, 15 seconds) the delay was not there.

    Something interesting about the bug is the fact that it was sending the request very frequently, every minute at least.

    So we are no closer to knowing the true cause but thank you for these helpful troubleshooting steps which I will use if it ever happens again.

    Plugin Support wfphil

    (@wfphil)

    Hi @kosmicare

    The request that you highlighted happens once during the scan. If you have a lot of plugins / themes installed then it can take a while as this is used to get hashes of all plugin / theme files. Six seconds is still pretty slow, but shouldn’t affect the site’s normal traffic.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Slow site due to time out of admin-ajax.php?action=wordfence_testAjax’ is closed to new replies.