1

When I try to run drush cache-rebuild it show below error:

PHP Fatal error: Allowed memory size of 2097152 bytes exhausted (tried to allocate 4096 bytes) in /usr/local/src/drush/vendor/composer/autoload_static.php on line 4129

I already set to 4000MB as the problem still exist, do any one know how to fixed it?

leymannx
  • 5,138
  • 5
  • 45
  • 48
Tony
  • 31
  • 3
  • Hard to tell from afar. Seeing that you have a global Drush which is not how it's supposed to be installed anymore, what version of Drush for what version of Drupal are you using with what version of PHP? Is it the same for a fresh site install? Did you try to disable some modules before trying to rebuild cache again? – leymannx Jun 08 '20 at 05:48
  • It is not a fresh site and I am currently using php 7.2, I am using drush 9, It seems I uninstall some module but the problem still exist, did there is any location can set the memory limit for drush? – Tony Jun 08 '20 at 08:21
  • 2
    I can successfully execute drush command via below: "php -d memory_limit=-1 /bin/drush status" – Tony Jun 08 '20 at 09:29
  • That's a maybe a valid workaround. Consider adding this as answers. – leymannx Jun 08 '20 at 12:26

0 Answers0