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 10 months, 3 weeks ago by
Nic Windley.
-
This reply was modified 10 months, 3 weeks ago by
Nic Windley.
-
This reply was modified 10 months, 3 weeks 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 π
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 10 months, 3 weeks 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/
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.
-
This reply was modified 10 months, 2 weeks ago by
Nic Windley.
@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.
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.
@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 π