Support » Plugin: All In One WP Security & Firewall » High CPU usage
High CPU usage
-
Hello,
Every morning around 6AM (UTC +3) we have too high CPU usage. Is there some external cron jobs which do this high CPU usage? The automatic change detection scan has been stopped and I have no idea what happens and why at 6 AM we have high CPU usage. If the AIO is deactivated the CPU usage is normal throughout the day. Please advice where is the problem and how can I solve it?Thank you!
-
Hi, try the following plugin to see your cron jobs. This might help you.
https://wordpress.org/plugins/wp-crontrol/
Kind regards
-
This reply was modified 2 years, 10 months ago by
mbrsolution.
Hi,
I tried, but nothing happens. Also, I’ve tried to disable AIO and I’ve no high CPU usage. Any suggestions why is this happens?Hi,
What type of server is your site hosted in?
Thank you
Hi,
The website is located on the VM server.Hi, sorry for not explaining myself. What are your server specs?
Thank you
Hi,
I have no info about server specs. But after removing the actions from the fileall-in-one-wp-security-and-firewall/classes/wp-security-cronjob-handler.php
do_action('aiowps_perform_scheduled_backup_tasks'); do_action('aiowps_perform_fcd_scan_tasks'); do_action('aiowps_perform_db_cleanup_tasks');
The problem is solved. Before that, I have disabled files scanning from the admin panel, but unfortunately, it isn’t applied as well. I’m not sure only the action
aiowps_perform_fcd_scan_tasks
is the problem, but I suggest it is the main villain.I think this –
AIOWPSecurity_Cronjob_Handler->aiowps_hourly_cron_event_handler()
cron event is the main reason of the hight CPU usage. About this cron eventAIOWPSecurity_Cronjob_Handler->aiowps_daily_cron_event_handler()
I saw it hasn’t any code in the body of the methodaiowps_daily_cron_event_handler
.This is happening with the AIO version 4.4.0 and WordPress version 5.2.2.
Thank you very much for providing this great information. I have submitted a message to the developers to investigate further your findings.
Kind regards
Thank you too!
If you have any future information about that problem, could you please share with me here? Thank you!Kind regards
Hi @skarabeq,
You say that once per day you have high CPU usage.
Just to confirm, which of the following do you have enabled:
– file change detection
– DB Backup >> Automated Scheduled DB backupsIf any of the above are enabled, what is the interval setting for each?
One of the above tasks is probably being run which may be causing the elevated CPU.
How does the CPU load look when you disable one or both of above?Hi @wpsolutions,
The file change detection and DB backups are disabled in the admin panel, but I’m not sure they are disabled. If there is some bug, and only it is visual looks like they are disabled, but they aren’t, this is eventual scenario.I saw the following cron events:
Hook name:
aiowps_hourly_cron_event
Action:AIOWPSecurity_Cronjob_Handler->aiowps_hourly_cron_event_handler()
Recurrence:Onece Hourly
Hook name:
aiowps_daily_cron_event
Action:AIOWPSecurity_Cronjob_Handler->aiowps_daily_cron_event_handler()
Recurrence:Once Daily
There is one other task which gets checked hourly behind the scenes:
The plugin will check the tables it created and if they contain more than 5000 rows it will delete the oldest rows.
The tables checked are:
wp_aiowps_events
wp_aiowps_failed_logins
wp_aiowps_global_meta
wp_aiowps_login_activityThe default number of rows (5000) to keep can be changed via one of several filters.
Additionally the plugin will also check for and delete any expired transients in the options table which may have been created from the captcha feature.Having said that, I’m still perplexed as to why you are seeing a high CPU usage only once per day. Perhaps over the course of 24 hours some of the tables mentioned above grow to size larger than 5000 rows and the plugin deletes the oldest rows over 5000.
Hi, is your issue resolved?
Thank you
Hi @mbrsolution,
The issue is resolved. We increased the server resources.Thank you. I am sure this will help others.
Enjoy the plugin.
Hi,
I found this thread and have a similar problem, hope its ok that I post it here.
In our logfiles there is an hourly error like this:
CRITICAL Allowed memory size of 536870912 bytes exhausted (tried to allocate 8388616 bytes) in /var/www/vhosts/example.com/httpdocs/wp-includes/wp-db.php on line 1973
I tracked it down to the aiowps_hourly_cron_event, when I pause that (or turn it off), the error dissapears.
I already updated our version of the plugin from 4.3.4 to 4.4.3, but that didnt help.
Do you have any suggestions on how to fix this or could you explain why the cron isgenerating this error?
-
This reply was modified 2 years, 10 months ago by
- The topic ‘High CPU usage’ is closed to new replies.