I am encoutering the following error with Symfony 5 when trying to
bin/console cache:clear
I know how I could patch that (memory_limit=-1) but I want know why I have this error.
Error :
PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 32230840 bytes) in /Applications/MAMP/htdocs/Toile./vendor/twig/twig/src/Lexer.php on line 157
15:50:13 CRITICAL [php] Fatal Error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 32230840 bytes)
[ "exception" => Symfony\Component\ErrorHandler\Error\OutOfMemoryError { -error: [ "type" => 1, "message" => "Allowed memory size of 134217728 bytes exhausted (tried to allocate 32230840 bytes)", "file" => "/Applications/MAMP/htdocs/Toile./vendor/twig/twig/src/Lexer.php", "line" => 157 ] #message: "Error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 32230840 bytes)" #code: 0 #file: "./vendor/twig/twig/src/Lexer.php" #line: 157 } ]
In Lexer.php line 157: Error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 32230840 bytes)
I am unable to track from where this error comes from.
I removed all twig templates from my project, I clearing the cache manually but nothing .. Any idea?
Thanks
php -dmemory_limit=1G bin/console ca:cl
– Lorenelorens