Support » Fixing WordPress » Excessive HTTP Requests Consuming Resources

  • Resolved Nic Windley

    (@nisiwi)


    Hello WP Fixers,

    I’m hitting some resource limitations which are resulting in connection losses and 503 errors and seem to be caused by excessive HTTP requests, mostly while accessing WP admin.

    I tried adding the snippet suggested in this article to trace the plugin making the HTTP requests however it didn’t seem to work for me.

    https://neliosoftware.com/blog/finding-culprit-of-high-cpu-usage-in-wordpress-server/?nab=0

    So, using Log HTTP Requests plugin (cleaner than server logs) I am seeing the following:

    /wp-admin/admin-ajax.php?action=ju_proceed&ju_token=TOKENREMOVED&speed=75
    302 1.0863
    Which appears often and when it does at least every minute, sometimes more frequently however, I’m not sure what is triggering this resulting in a 302.

    On a side note, I also identified the following file which does not seem to exist in WooCommerce
    /wp-content/plugins/woocommerce-payments/dist/payment-request.css
    404 3.2311

    Any help resolving this would be much appreciated.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter Nic Windley

    (@nisiwi)

    Looking at the server CPU and DB usage it seems to exceed limits every hour which suggests that it’s linked to a cron event.

    I have a system cron (wp-cron disabled) scheduled to run every 30mins.

    These are the hourly events that I can see registered in WP:

    jetpack_clean_nonces
    ACTION = Automattic\Jetpack\Connection\Manager->clean_nonces()

    fluentcrm_scheduled_hourly_tasks
    ACTION = None

    gfw_hourly_event
    ACTION = None

    wc_admin_process_orders_milestone
    ACTION = Automattic\WooCommerce\Admin\Notes\OrderMilestones->other_milestones()

    wc_admin_unsnooze_admin_notes
    ACTION = None

    wp_privacy_delete_old_export_files
    ACTION = None

    sq_cron_process
    ACTION = None

    This seems to point in the direction of WooCommerce/Jetpack and I don’t have JetPack installed, however I understand WooCommerce Services uses Jetpack.

    • This reply was modified 9 months, 1 week ago by Nic Windley.
    • This reply was modified 9 months, 1 week ago by Nic Windley.
    • This reply was modified 9 months, 1 week ago by Nic Windley.

    @nisiwi Use this: https://wordpress.org/plugins/health-check/ in troubleshoot mode to deactivate plugins and switch back to default theme without affecting your normal visitors.

    You can also follow this thread: https://wordpress.org/support/topic/cpu-usage-100-problem/

    Let me know how it goes 🙂

    Thread Starter Nic Windley

    (@nisiwi)

    I’m not sure it will help Kuldeep as this is getting triggered by a cron event which is then spawning multiple requests. It doesn’t happen generally just once every hour or 30mins.

    When the last cron event ran consuming all resources I got this notice raised over 30 times

    Notice: Undefined index: HTTP_HOST in /home/ACCOUNT/public_html/wp-content/mu-plugins/htpm-mu-plugin.php on line 40

    • This reply was modified 9 months, 1 week ago by Nic Windley.

    @nisiwi

    Undefined index: HTTP_HOST in /home/ACCOUNT/public_html/wp-content/mu-plugins/htpm-mu-plugin.php on line 40

    What’s on line 40? It maybe related to that. Here is a similar thread: https://wordpress.org/support/topic/undefined-index-http_host-error/

    If you feel WooCommerce might be causing this, I would recommend asking here: https://wordpress.org/support/plugin/woocommerce/

    Also here is a workaround if you are interested: https://wpjohnny.com/disable-wp-cron-use-real-cron-job/

    Thread Starter Nic Windley

    (@nisiwi)

    Finally, got this narrowed down and I think you’re right Kuldeep, Health Check can help with this.

    It turns out the underlying problem was memory settings which are now resolved, everything is now stable.

    However, when in WP Admin, under normal conditions everything is fine. When editing WooCommerece products I sometimes have multiple tabs open and I soon realised that consumes massive resources which I suspect is related to a WooCommerce plugin.

    I can use Health Check now to pinpoint the culprit.

    Many thanks.

    Kuldeep

    (@soberbanda)

    @nisiwi Glad it was sorted 🙂

    Here is an article you can go through to reduce CPU Usage: https://geektnt.com/how-to-solve-wp-cron-php-high-cpu-usage.html

    And, thank you for updating the thread.

    Thread Starter Nic Windley

    (@nisiwi)

    I already use a system cron Kuldeep and the cron is no loner the issue. It’s whatever the editor is loading (WooCommerce plugins) when editing products that is spinning up all those processes

    Thank you for your reply.

    Kuldeep

    (@soberbanda)

    @nisiwi Consider increasing your server resources. I think spikes are normal while editing. I use salient theme and it goes crazy when editing pages. The theme is a resource hog but it was fine after I moved ahead from the base plan.

    Have a good day 🙂

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Excessive HTTP Requests Consuming Resources’ is closed to new replies.