• Resolved pimschaaf

    (@pimschaaf)


    Activating Wordfence (Free) generates consistent 503 errors on various async calls made by the backend dashboards for Woocommerce and Woocommerce Payments.

    All plugins and WordPress are latests versions.

    I’ve enabled Woocommerce integration in the settings and did a full reset of Wordfence (manual & through Wordfence Assistant).
    Enabling Wordfence after that gives the following errors in the console when loading the Woocommerce Dashboard:

    api-fetch.min.js:2          GET [redacted]/wp-json/wc-admin/onboarding/tasks?_locale=user 503
    api-fetch.min.js:2          GET [redacted]/wp-json/wc-analytics/admin/notes?page=1&per_page=25&type=error%2Cupdate&status=unactioned&_locale=user 503
    api-fetch.min.js:2          GET [redacted]/wp-json/wc-admin/options?options=woocommerce_ces_tracks_queue&_locale=user 503
    api-fetch.min.js:2          GET [redacted]/wp-json/wc/v3/orders?_fields%5B0%5D=id&page=1&per_page=1&_locale=user 503
    jquery.min.js:2             GET [redacted]/wp-json/jetpack/v4/jitm?message_path=wp%3Awoocommerce_page_wc-admin%3Aadmin_notices&query=page%253Dwc-admin&full_jp_logo_exists=false&_wp

    I’ve tried increasing the server and WordPress memory (1024MB), CPU power (300%) and PHP timeouts (120s) and performance by configuring W3 Total Cache with Redis cache. That does not make a difference.

    I’ve checked the Live Traffic dashboard (with logging enabled for users with publishing access) while (re)loading the Woocommerce dashboard but it does not show any hits (perhaps because it’s backend?). The Live Traffic dashboard sometimes gets a 503 error as well, on browser reload.

    The dashboards work with Wordfence disabled.
    I’d like to benefit from the security configuration Wordfence Free offers.

    Have never experienced anything similar while maintaining 50+ Wordfence installs to date..
    Keep up the good work!

    • This topic was modified 2 years, 6 months ago by pimschaaf.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support wfpeter

    (@wfpeter)

    Hi @pimschaaf, thanks for getting in touch.

    The only part of your configuration changes that I’d recommend that you to revert would be the PHP timouts as we find numbers over 60 can be problematic. We advise max_execution_time in php.ini is set to 60 or below. Wordfence only uses half of this number by default, but I’ve certainly seen scan problems arise in the past with values like 120 – so in your case it’s just to prevent another issue before it crops up.

    Wordfence should run in Learning Mode for the first 7 days after activation, which I would’ve thought should combat these kinds of WooCommerce 503 issues. If for some reason you’re not running in Learning Mode, please try enabling it and let me know if the situation improves. Please let me know if this is/isn’t the case here.

    From the Wordfence Dashboard click on Manage WAF. Then you will see Basic Firewall Options > Web Application Firewall Status. Change the option to Learning Mode. Now visit the WooCommerce pages with scripts that were causing 503 issues. This will help Wordfence learn that these actions are normal and it will allow them in the future. After you have finished performing the actions, switch the WAF from Learning Mode back to Enabled and Protecting. Now test again to see if these actions work correctly.

    If you’ve already tried a period in Learning Mode or nothing else has come to light during your tests, can you send a diagnostic report to wftest @ wordfence . com? You can find the link to do so at the top of the Wordfence > Tools > Diagnostics page. Then click on “Send Report by Email”. Please add your forum username where indicated and respond here after you have sent it.

    NOTE: It should look as follows – Screenshot of Tools > Diagnostic > Send by Email

    Thanks,

    Peter.

    Thread Starter pimschaaf

    (@pimschaaf)

    Hi Peter,
    Thanks for your quick and in depth response. I’ll post back tomorrow as soon as I’ve tested your suggestions.

    Thread Starter pimschaaf

    (@pimschaaf)

    Hi Peter,

    Posting back to confirm that things work in Learning Mode and continue to be good after Optimizing the Firewall and disabling Learning Mode. The issue is solved.

    I’m not sure why this didn’t work after the full reset, which I think would have re-enabled learning mode as well.
    Out of interest: shouldn’t these URLs then show up under the Allowlisted URLs section?

    I’ve also lowered the max_execution_time. Thanks for describing issue that might cause.

    Thank you very much for your help.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Wordfence + Woocommerce gives 503 errors’ is closed to new replies.