title: Symfony2: Allowed memory size of 134217728 bytes exhausted
body: <p>I am using Symfony2. I use below command to clear the cache.</p>
  
  <pre><code> app/console ca:cl
  </code></pre>
  
  <p>when this command runs after some seconds it shows me error</p>
  
  <pre><code>Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate
  64 bytes) in D:\wamp\www\wenweipo\vendor\twig\twig\lib\Twig\Node\Print.php 
  on line 22
  </code></pre>
  
  <p>I found some solution but that does not works for me.I change the Memory Limit in <code>php.ini</code> to </p>
  
  <pre><code>memory_limit = 256M
  </code></pre>
  
  <p>I also set it to <code>-1</code> but same problem. After that I use below command that works for me</p>
  
  <pre><code> php -d memory_limit=256M app/console cache:clear
  </code></pre>
  
  <p>now the problem is that this command takes a lot of time (2 to 3 minutes) to clear cache.Is there any solution?
  Also sometimes when I open a page it shows me <code>The connection was reset</code> and I hit page many times and it works.
  Is it the problem of cache?</p>