Details
Description
No matter what you put as your settings in civicrm/admin/mail?reset=1, only 1 cron job runs at a time. The rest exit with "Returning early, since max number of cronjobs running". After further investigation I found that in CRM/Mailing/BAO/Mailing.php, in the processQueue function, the values in $config are wrong.
My settings are 3 mailerJobsMax and 5000 mailerJobSize, but $config->mailerJobsMax, $config->mailerJobSize, and $config->mailerJobSize are both 0.
$config is getting loaded like this:
$config =& CRM_Core_Config::singleton();
But if I force the cache to get reloaded by running this (in the singleton function of CRM/Core/Config.php):
self::$_singleton = new CRM_Core_Config;
self::$_singleton->_initialize( $loadFromDB );
It returns $config with the correct values.
However, even when I set mailerJobsMax to 3 it ended up running 8 processes at the same time during a test mailing. So something else might be wrong here too.