Few days ago I started a new Symfony2 application and I get some troubles with cache:
$ rm -rf ./app/cache/*
$ rm -rf ./app/logs/*
$ ./app/console cache:clear
Clearing the cache for the dev environment with debug true
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 72 bytes) in /Users/simonegentili/Development/Www/shop_website/vendor/twig/twig/lib/Twig/Node/Text.php on line 23
And ...
$ ./app/console cache:clear --env=prod
works fine.
The correct way is to edit your php. ini file. Edit memory_limit to your desire value. As from your question, 128M (which is the default limit) has been exceeded, so there is something seriously wrong with your code as it should not take that much.
Fix error allowed memory size WP with WHMLog in to WHM. Go to "MultiPHP INI Editor". If you have multiple PHP versions on the server, set the one that is responsible for the problem with your Wordpress website. Scroll down where it says "memory_limit" and immediately make it 256M or even 512M.
Allowed memory size of 1610612736 bytes exhausted ??? can someone help me this? Try prefixing your command with COMPOSER_MEMORY_LIMIT=-1 . This will remove the memory limit for the execution of the command.
I had such problem in the past. Looks like for big projects this CLI script try to make too much work. As I discover it possible set amount of memory available in this case:
sudo php -d memory_limit=256M app/console cache:clear
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With