1

Cron has stopped running and an unexpected memory issue has popped up in logs

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 1622016 bytes) in /wp-content/plugins/civicrm/civicrm/vendor/pear/db/DB/mysqli.php on line 411

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 69632 bytes) in /wp-content/plugins/civicrm/civicrm/CRM/Core/BAO/Cache.php on line 226

Happened after switching to php 8.3 (2g memory allocated already) & CiviCRM 5.74.4.

Switch back to php 8.1 & 1G memory made cron running again.

5
  • What CMS are you using? Commented Sep 5 at 2:56
  • @DetlevSieber Wordpress - the latest.
    – yurg
    Commented Sep 5 at 10:08
  • Same issue on my side while running cron on Drupal: Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 36864 bytes) in /var/www/vhosts/domain.com/httpdocs/sites/all/modules/civicrm/packages/Smarty/Smarty_Compiler.class.php on line 359` Commented Sep 8 at 19:36
  • @GuillaumeSorel which PHP is it? There are a lot of reasons of memory issues, mine is narrowed down be PHP8.3-related and,perhaps,some code incompatibility - not sure if it is Civi or its extension or something at wordpress side.
    – yurg
    Commented Sep 9 at 11:41
  • 1
    I think it was 8.3.9 or 8.3.10 Commented Sep 10 at 12:17

1 Answer 1

1

I once had a similar thing: The system was running with WordPress, and there was a certain WordPress plugin installed, that was poorly programmed (in that case, the WP plugin checked if memory is at least 128MB or so by only checking if it starts with a number > 128 - otherwise the WordPress plugin overwrote the PHP memory setting with 128MB...). Your current issue might have a similar root cause.

You could use some WordPress plugin that shows you your "real" memory settings, and it might come out, that you really don't have more than 128MB available... What normally is not a problem, but scheduled jobs often need more memory.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.