Skip to main content

[EMERGENY] cron job 'fluentcrm_scheduled_hourly_tasks' crushing my server

its the 2nd time that cron job 'fluentcrm_scheduled_hourly_tasks' crushing my server- anyone had something like that?

How do you handle it?

Mat β€Ž

Maor BenezriΒ you should verify if you have jobs overlap or too many cron jobs (automation execution, email sending, unfinished previous cron jobs) in a queue. Also check your CPU/Memory usage - you might require some upgrade.

Note: if you run your cron jobs via wordpress wp-cron then use servers task scheduler to invoke cron jobs

ps. I am not sure if a crontrol plugin could help to investigate your cron jobs: https://wordpress.org/plugins/wp-crontrol/

Maor Benezri

Mat β€ŽΒ Hey Mat, thank you,

The problem started once i duplicate my community to subdomain to work on it as a sandbox - i think what is happening is both the main community and the subdomain one trying to do the cron jobs thing at the same time,

is it make sense?

Mat β€Ž

Maor BenezriΒ It can be but... both Wordpress instances (primary-production, secondary-staging) are a separate URLs and I am not sure if your staging / duplicated site is referring to the original wp-cron jobs (primary wp instance/domain) or both WP instances have separate cron jobs but running at the same time.

In both cases probably you dont have enough resources. Before upgrade you should check if this can be optimized.

Note: if you duplicated your site manualy via FTP by copying folder then you should adjust your wp-cron settings (if that is the case) etc.

You could try to change also some settings like: max_execution_time

Note: I hope you are not using shared hosting (you mentioned: server) because there are some limits for sure.

You could try to change some specs/php settings but its hard to give you exact root cause/solution.

If you know what you are doing by changing default settings then try one of the below ways but it wont resolve the issue in a long run:

.htaccess file

<IfModule mod_php5.c>
php_value max_execution_time 300
</IfModule>

More configuration options

<IfModule mod_php5.c>
php_value post_max_size 5M
php_value upload_max_filesize 5M
php_value memory_limit 128M
php_value max_execution_time 300
php_value max_input_time 300
php_value session.gc_maxlifetime 1200
</IfModule>

If wordpress, set this in the config.php file,

define('WP_MEMORY_LIMIT', '128M'