{"action":"opened","issue":{"url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/issues/1161","repository_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle","labels_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/issues/1161/labels{/name}","comments_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/issues/1161/comments","events_url":"https://api.github.com/repos/javiereguiluz/EasyAdminBundle/issues/1161/events","html_url":"https://github.com/javiereguiluz/EasyAdminBundle/issues/1161","id":154234273,"number":1161,"title":"PHP's memory limit with EasyAdminBundle","user":{"login":"appyapp","id":16601546,"avatar_url":"https://avatars.githubusercontent.com/u/16601546?v=3","gravatar_id":"","url":"https://api.github.com/users/appyapp","html_url":"https://github.com/appyapp","followers_url":"https://api.github.com/users/appyapp/followers","following_url":"https://api.github.com/users/appyapp/following{/other_user}","gists_url":"https://api.github.com/users/appyapp/gists{/gist_id}","starred_url":"https://api.github.com/users/appyapp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/appyapp/subscriptions","organizations_url":"https://api.github.com/users/appyapp/orgs","repos_url":"https://api.github.com/users/appyapp/repos","events_url":"https://api.github.com/users/appyapp/events{/privacy}","received_events_url":"https://api.github.com/users/appyapp/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-05-11T12:43:32Z","updated_at":"2016-05-11T12:43:32Z","closed_at":null,"body":"Hi Javier,\r\n\r\nFirst of all, thanks to you to provide such an amazing bundle. It's really quite esay to configure and use.\r\nBut I would like to have your advice on something that disturb me.\r\nI created a backend with my three entities :\r\n- Races (relation n-1 with Category, relation n-n with SubCategory)\r\n- Category (relation n-n with SubCategory)\r\n- SubCategory\r\n\r\nI did some configuration on the fields shown in list, search,edit,show views.\r\nWhen I try to clear the cache of all my application (in order to override a FOSUser Template for example), I reach the limit of allowed memory for PHP, which is 128MB. I passed it to 256M for the CLI and the cache is cleared without warnings.\r\nTo resolve memory limit problem, the popular answer is to do what I've done : increase the memory. But for my point of view, it doesn't resolve an unoptimized script...\r\nSo, is it normal to reach the memory limit with cache:clear in a dev environment and with EasyAdminBundle ?\r\nWhat will happen in the production environment? Will I need 128M or 256M ?\r\n\r\nAnd if you can enlighten where the error comes from, I paste you the output of the command :\r\n\r\n```\r\n\r\nc:\\wamp\\www\\calendario-deportivo>php bin/console cache:clear -vvv\r\n\r\n // Clearing the cache for the dev environment with debug true\r\n // Clearing outdated warmup directory...\r\n // Warming up cache...\r\n\r\n\r\nFatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 26 bytes) in C:\\wamp\\www\\calendario-deportivo\\vendor\\twig\\twig\\lib\\Twig\\NodeTraverser.php on line 71\r\n\r\nCall Stack:\r\n    0.0002     238288   1. {main}() C:\\wamp\\www\\calendario-deportivo\\bin\\console:0\r\n    0.0298    2278176   2. Symfony\\Component\\Console\\Application->run() C:\\wamp\\www\\calendario-deportivo\\bin\\console:29\r\n    0.0351    2552648   3. Symfony\\Bundle\\FrameworkBundle\\Console\\Application->doRun() C:\\wamp\\www\\calendario-deportivo\\vendor\\symfony\\symfony\\src\\Symfony\\Component\\Console\\Application.php:117\r\n    0.3412   15103024   4. Symfony\\Component\\Console\\Application->doRun() C:\\wamp\\www\\calendario-deportivo\\vendor\\symfony\\symfony\\src\\Symfony\\Bundle\\FrameworkBundle\\Console\\Application.php:80\r\n    0.3416   15104008   5. Symfony\\Component\\Console\\Application->doRunCommand() C:\\wamp\\www\\calendario-deportivo\\vendor\\symfony\\symfony\\src\\Symfony\\Component\\Console\\Application.php:186\r\n    0.3482   15341784   6. Symfony\\Component\\Console\\Command\\Command->run() C:\\wamp\\www\\calendario-deportivo\\vendor\\symfony\\symfony\\src\\Symfony\\Component\\Console\\Application.php:807\r\n    0.3486   15343824   7. Symfony\\Bundle\\FrameworkBundle\\Command\\CacheClearCommand->execute() C:\\wamp\\www\\calendario-deportivo\\vendor\\symfony\\symfony\\src\\Symfony\\Component\\Console\\Command\\Command.php:256\r\n    0.4027   15778296   8. Symfony\\Bundle\\FrameworkBundle\\Command\\CacheClearCommand->warmup() C:\\wamp\\www\\calendario-deportivo\\vendor\\symfony\\symfony\\src\\Symfony\\Bundle\\FrameworkBundle\\Command\\CacheClearCommand.php:96\r\n    7.4046   52871904   9. Symfony\\Component\\HttpKernel\\CacheWarmer\\CacheWarmerAggregate->warmUp() C:\\wamp\\www\\calendario-deportivo\\vendor\\symfony\\symfony\\src\\Symfony\\Bundle\\FrameworkBundle\\Command\\CacheClearCommand.php:144\r\n   39.9103  112740368  10. Symfony\\Bundle\\TwigBundle\\CacheWarmer\\TemplateCacheWarmer->warmUp() C:\\wamp\\www\\calendario-deportivo\\vendor\\symfony\\symfony\\src\\Symfony\\Component\\HttpKernel\\CacheWarmer\\CacheWarmerAggregate.php:48\r\n   48.7918  132852000  11. Twig_Environment->loadTemplate() C:\\wamp\\www\\calendario-deportivo\\vendor\\symfony\\symfony\\src\\Symfony\\Bundle\\TwigBundle\\CacheWarmer\\TemplateCacheWarmer.php:39\r\n   48.7926  132862448  12. Twig_Environment->compileSource() C:\\wamp\\www\\calendario-deportivo\\vendor\\twig\\twig\\lib\\Twig\\Environment.php:396\r\n   48.8112  133291144  13. Twig_Environment->parse() C:\\wamp\\www\\calendario-deportivo\\vendor\\twig\\twig\\lib\\Twig\\Environment.php:667\r\n   48.8112  133291144  14. Twig_Parser->parse() C:\\wamp\\www\\calendario-deportivo\\vendor\\twig\\twig\\lib\\Twig\\Environment.php:615\r\n   48.8314  133828528  15. Twig_NodeTraverser->traverse() C:\\wamp\\www\\calendario-deportivo\\vendor\\twig\\twig\\lib\\Twig\\Parser.php:121\r\n   48.8461  133829528  16. Twig_NodeTraverser->traverseForVisitor() C:\\wamp\\www\\calendario-deportivo\\vendor\\twig\\twig\\lib\\Twig\\NodeTraverser.php:64\r\n   48.8462  133831200  17. Twig_NodeTraverser->traverseForVisitor() C:\\wamp\\www\\calendario-deportivo\\vendor\\twig\\twig\\lib\\Twig\\NodeTraverser.php:80\r\n   48.8462  133832112  18. Twig_NodeTraverser->traverseForVisitor() C:\\wamp\\www\\calendario-deportivo\\vendor\\twig\\twig\\lib\\Twig\\NodeTraverser.php:80\r\n   48.8462  133832808  19. Twig_NodeTraverser->traverseForVisitor() C:\\wamp\\www\\calendario-deportivo\\vendor\\twig\\twig\\lib\\Twig\\NodeTraverser.php:80\r\n   48.8463  133833624  20. Twig_NodeTraverser->traverseForVisitor() C:\\wamp\\www\\calendario-deportivo\\vendor\\twig\\twig\\lib\\Twig\\NodeTraverser.php:80\r\n   48.8489  133862536  21. Twig_NodeTraverser->traverseForVisitor() C:\\wamp\\www\\calendario-deportivo\\vendor\\twig\\twig\\lib\\Twig\\NodeTraverser.php:80\r\n   48.8490  133863360  22. Twig_NodeTraverser->traverseForVisitor() C:\\wamp\\www\\calendario-deportivo\\vendor\\twig\\twig\\lib\\Twig\\NodeTraverser.php:80\r\n   48.8527  133946976  23. Twig_NodeTraverser->traverseForVisitor() C:\\wamp\\www\\calendario-deportivo\\vendor\\twig\\twig\\lib\\Twig\\NodeTraverser.php:80\r\n   48.8527  133947712  24. Twig_NodeTraverser->traverseForVisitor() C:\\wamp\\www\\calendario-deportivo\\vendor\\twig\\twig\\lib\\Twig\\NodeTraverser.php:80\r\n   48.8527  133948624  25. Twig_NodeTraverser->traverseForVisitor() C:\\wamp\\www\\calendario-deportivo\\vendor\\twig\\twig\\lib\\Twig\\NodeTraverser.php:80\r\n   48.8527  133949552  26. Twig_NodeTraverser->traverseForVisitor() C:\\wamp\\www\\calendario-deportivo\\vendor\\twig\\twig\\lib\\Twig\\NodeTraverser.php:80\r\n```\r\nAnd sometimes I get this error:\r\n```\r\n\r\nc:\\wamp\\www\\calendario-deportivo>php bin/console cache:clear -vvv\r\n\r\n // Clearing the cache for the dev environment with debug true\r\n // Clearing outdated warmup directory...\r\n // Warming up cache...\r\n\r\nFatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 64 bytes) in C:\\wamp\\www\\calendario-deportivo\\vendor\\twig\\twig\\lib\\Twig\\NodeVisitor\\SafeAnalysis.php on line 55\r\n\r\nCall Stack:\r\n    0.0002     238288   1. {main}() C:\\wamp\\www\\calendario-deportivo\\bin\\console:0\r\n    0.0270    2278176   2. Symfony\\Component\\Console\\Application->run() C:\\wamp\\www\\calendario-deportivo\\bin\\console:29\r\n    0.0325    2552648   3. Symfony\\Bundle\\FrameworkBundle\\Console\\Application->doRun() C:\\wamp\\www\\calendario-deportivo\\vendor\\symfony\\symfony\\src\\Symfony\\Component\\Console\\Application.php:117\r\n    0.3357   15103024   4. Symfony\\Component\\Console\\Application->doRun() C:\\wamp\\www\\calendario-deportivo\\vendor\\symfony\\symfony\\src\\Symfony\\Bundle\\FrameworkBundle\\Console\\Application.php:80\r\n    0.3361   15104008   5. Symfony\\Component\\Console\\Application->doRunCommand() C:\\wamp\\www\\calendario-deportivo\\vendor\\symfony\\symfony\\src\\Symfony\\Component\\Console\\Application.php:186\r\n    0.3429   15341784   6. Symfony\\Component\\Console\\Command\\Command->run() C:\\wamp\\www\\calendario-deportivo\\vendor\\symfony\\symfony\\src\\Symfony\\Component\\Console\\Application.php:807\r\n    0.3433   15343824   7. Symfony\\Bundle\\FrameworkBundle\\Command\\CacheClearCommand->execute() C:\\wamp\\www\\calendario-deportivo\\vendor\\symfony\\symfony\\src\\Symfony\\Component\\Console\\Command\\Command.php:256\r\n    0.8473   15778296   8. Symfony\\Bundle\\FrameworkBundle\\Command\\CacheClearCommand->warmup() C:\\wamp\\www\\calendario-deportivo\\vendor\\symfony\\symfony\\src\\Symfony\\Bundle\\FrameworkBundle\\Command\\CacheClearCommand.php:96\r\n    5.2737   52868512   9. Symfony\\Component\\HttpKernel\\CacheWarmer\\CacheWarmerAggregate->warmUp() C:\\wamp\\www\\calendario-deportivo\\vendor\\symfony\\symfony\\src\\Symfony\\Bundle\\FrameworkBundle\\Command\\CacheClearCommand.php:144\r\n   27.6128  112740928  10. Symfony\\Bundle\\TwigBundle\\CacheWarmer\\TemplateCacheWarmer->warmUp() C:\\wamp\\www\\calendario-deportivo\\vendor\\symfony\\symfony\\src\\Symfony\\Component\\HttpKernel\\CacheWarmer\\CacheWarmerAggregate.php:48\r\n   35.0526  132841064  11. Twig_Environment->loadTemplate() C:\\wamp\\www\\calendario-deportivo\\vendor\\symfony\\symfony\\src\\Symfony\\Bundle\\TwigBundle\\CacheWarmer\\TemplateCacheWarmer.php:39\r\n   35.0532  132851512  12. Twig_Environment->compileSource() C:\\wamp\\www\\calendario-deportivo\\vendor\\twig\\twig\\lib\\Twig\\Environment.php:396\r\n   35.0722  133275024  13. Twig_Environment->parse() C:\\wamp\\www\\calendario-deportivo\\vendor\\twig\\twig\\lib\\Twig\\Environment.php:667\r\n   35.0722  133275024  14. Twig_Parser->parse() C:\\wamp\\www\\calendario-deportivo\\vendor\\twig\\twig\\lib\\Twig\\Environment.php:615\r\n   35.0937  133812432  15. Twig_NodeTraverser->traverse() C:\\wamp\\www\\calendario-deportivo\\vendor\\twig\\twig\\lib\\Twig\\Parser.php:121\r\n   35.1095  133813432  16. Twig_NodeTraverser->traverseForVisitor() C:\\wamp\\www\\calendario-deportivo\\vendor\\twig\\twig\\lib\\Twig\\NodeTraverser.php:64\r\n   35.1096  133815104  17. Twig_NodeTraverser->traverseForVisitor() C:\\wamp\\www\\calendario-deportivo\\vendor\\twig\\twig\\lib\\Twig\\NodeTraverser.php:80\r\n   35.1096  133816016  18. Twig_NodeTraverser->traverseForVisitor() C:\\wamp\\www\\calendario-deportivo\\vendor\\twig\\twig\\lib\\Twig\\NodeTraverser.php:80\r\n   35.1097  133816712  19. Twig_NodeTraverser->traverseForVisitor() C:\\wamp\\www\\calendario-deportivo\\vendor\\twig\\twig\\lib\\Twig\\NodeTraverser.php:80\r\n   35.1098  133817528  20. Twig_NodeTraverser->traverseForVisitor() C:\\wamp\\www\\calendario-deportivo\\vendor\\twig\\twig\\lib\\Twig\\NodeTraverser.php:80\r\n   35.1128  133846440  21. Twig_NodeTraverser->traverseForVisitor() C:\\wamp\\www\\calendario-deportivo\\vendor\\twig\\twig\\lib\\Twig\\NodeTraverser.php:80\r\n   35.1128  133847264  22. Twig_NodeTraverser->traverseForVisitor() C:\\wamp\\www\\calendario-deportivo\\vendor\\twig\\twig\\lib\\Twig\\NodeTraverser.php:80\r\n   35.1179  133953816  23. Twig_NodeTraverser->traverseForVisitor() C:\\wamp\\www\\calendario-deportivo\\vendor\\twig\\twig\\lib\\Twig\\NodeTraverser.php:80\r\n   35.1180  133954640  24. Twig_NodeTraverser->traverseForVisitor() C:\\wamp\\www\\calendario-deportivo\\vendor\\twig\\twig\\lib\\Twig\\NodeTraverser.php:80\r\n   35.1181  133955416  25. Twig_NodeTraverser->traverseForVisitor() C:\\wamp\\www\\calendario-deportivo\\vendor\\twig\\twig\\lib\\Twig\\NodeTraverser.php:80\r\n   35.1181  133956272  26. Twig_NodeTraverser->traverseForVisitor() C:\\wamp\\www\\calendario-deportivo\\vendor\\twig\\twig\\lib\\Twig\\NodeTraverser.php:80\r\n   35.1182  133957096  27. Twig_NodeTraverser->traverseForVisitor() C:\\wamp\\www\\calendario-deportivo\\vendor\\twig\\twig\\lib\\Twig\\NodeTraverser.php:80\r\n   35.1185  133966984  28. Twig_NodeTraverser->traverseForVisitor() C:\\wamp\\www\\calendario-deportivo\\vendor\\twig\\twig\\lib\\Twig\\NodeTraverser.php:80\r\n   35.1186  133967064  29. Twig_BaseNodeVisitor->leaveNode() C:\\wamp\\www\\calendario-deportivo\\vendor\\twig\\twig\\lib\\Twig\\NodeTraverser.php:87\r\n   35.1186  133967064  30. Twig_NodeVisitor_Escaper->doLeaveNode() C:\\wamp\\www\\calendario-deportivo\\vendor\\twig\\twig\\lib\\Twig\\BaseNodeVisitor.php:40\r\n   35.1186  133967064  31. Twig_NodeVisitor_Escaper->escapePrintNode() C:\\wamp\\www\\calendario-deportivo\\vendor\\twig\\twig\\lib\\Twig\\NodeVisitor\\Escaper.php:63\r\n   35.1186  133967064  32. Twig_NodeVisitor_Escaper->isSafeFor() C:\\wamp\\www\\calendario-deportivo\\vendor\\twig\\twig\\lib\\Twig\\NodeVisitor\\Escaper.php:83\r\n   35.1186  133967112  33. Twig_NodeTraverser->traverse() C:\\wamp\\www\\calendario-deportivo\\vendor\\twig\\twig\\lib\\Twig\\NodeVisitor\\Escaper.php:125\r\n   35.1186  133967400  34. Twig_NodeTraverser->traverseForVisitor() C:\\wamp\\www\\calendario-deportivo\\vendor\\twig\\twig\\lib\\Twig\\NodeTraverser.php:64\r\n   35.1186  133969248  35. Twig_NodeTraverser->traverseForVisitor() C:\\wamp\\www\\calendario-deportivo\\vendor\\twig\\twig\\lib\\Twig\\NodeTraverser.php:80\r\n   35.1186  133969248  36. Twig_BaseNodeVisitor->leaveNode() C:\\wamp\\www\\calendario-deportivo\\vendor\\twig\\twig\\lib\\Twig\\NodeTraverser.php:87\r\n   35.1186  133969248  37. Twig_NodeVisitor_SafeAnalysis->doLeaveNode() C:\\wamp\\www\\calendario-deportivo\\vendor\\twig\\twig\\lib\\Twig\\BaseNodeVisitor.php:40\r\n   35.1186  133969616  38. Twig_NodeVisitor_SafeAnalysis->setSafe() C:\\wamp\\www\\calendario-deportivo\\vendor\\twig\\twig\\lib\\Twig\\NodeVisitor\\SafeAnalysis.php:75\r\n```\r\n\r\n\r\nThanks in advance,\r\n\r\nPierre\r\n\r\n\r\n"}}