Discussion:
Memory exhausted on cache:clear --env=prod
Andy Baird
2013-12-30 04:10:10 UTC
Permalink
I'm currently deploying my Symfony2 app to AWS small instances (1.7G
memory) behind a load balancer.

I believe my codebase may have reached a point where clearing the cache now
causes memory errors. When I perform an app/console cache:clear --env=prod,
I get the following error after about 20 seconds:

Clearing the cache for the prod environment with debug false
PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried
to alocate 4304 bytes) in
/home/app/www/production/vendor/symfony/symfony/src/ymfony/Component/Filesystem/Filesystem.php
on line 132

It doesn't appear to have any negative side affects - the web app keeps
running just fine, but this seems alarming to me. Is there anything I can
do to fix or further investigate this?
--
--
If you want to report a vulnerability issue on Symfony, please read the procedure on http://symfony.com/security

You received this message because you are subscribed to the Google
Groups "Symfony2" group.
To post to this group, send email to symfony2-/***@public.gmane.org
To unsubscribe from this group, send email to
symfony2+unsubscribe-/***@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/symfony2?hl=en
---
You received this message because you are subscribed to the Google Groups "Symfony2" group.
To unsubscribe from this group and stop receiving emails from it, send an email to symfony2+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.
Luis Cordova
2013-12-30 11:28:33 UTC
Permalink
i think check this https://github.com/symfony/symfony/issues/8491
Post by Andy Baird
I'm currently deploying my Symfony2 app to AWS small instances (1.7G
memory) behind a load balancer.
I believe my codebase may have reached a point where clearing the cache
now causes memory errors. When I perform an app/console cache:clear
Clearing the cache for the prod environment with debug false
PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried
to alocate 4304 bytes) in
/home/app/www/production/vendor/symfony/symfony/src/ymfony/Component/Filesystem/Filesystem.php
on line 132
It doesn't appear to have any negative side affects - the web app keeps
running just fine, but this seems alarming to me. Is there anything I can
do to fix or further investigate this?
--
--
If you want to report a vulnerability issue on Symfony, please read the
procedure on http://symfony.com/security
You received this message because you are subscribed to the Google Groups "Symfony2" group.
To unsubscribe from this group, send email to
For more options, visit this group at
http://groups.google.com/group/symfony2?hl=en
---
You received this message because you are subscribed to the Google Groups "Symfony2" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/groups/opt_out.
--
--
If you want to report a vulnerability issue on Symfony, please read the procedure on http://symfony.com/security

You received this message because you are subscribed to the Google
Groups "Symfony2" group.
To post to this group, send email to symfony2-/***@public.gmane.org
To unsubscribe from this group, send email to
symfony2+unsubscribe-/***@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/symfony2?hl=en
---
You received this message because you are subscribed to the Google Groups "Symfony2" group.
To unsubscribe from this group and stop receiving emails from it, send an email to symfony2+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.
Parth Sarin
2013-12-30 17:17:27 UTC
Permalink
Try running a "rm -rf app/cache" in the root directory of your project,
and then visiting app.php or app_dev.php so Symfony "re-creates" the cache.

Now try running a "php app/console cache:clear --env=prod"... Did that help?

Hope it did!
Post by Andy Baird
I'm currently deploying my Symfony2 app to AWS small instances (1.7G
memory) behind a load balancer.
I believe my codebase may have reached a point where clearing the cache
now causes memory errors. When I perform an app/console cache:clear
Clearing the cache for the prod environment with debug false
PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried
to alocate 4304 bytes) in
/home/app/www/production/vendor/symfony/symfony/src/ymfony/Component/Filesystem/Filesystem.php
on line 132
It doesn't appear to have any negative side affects - the web app keeps
running just fine, but this seems alarming to me. Is there anything I can
do to fix or further investigate this?
--
--
If you want to report a vulnerability issue on Symfony, please read the procedure on http://symfony.com/security

You received this message because you are subscribed to the Google
Groups "Symfony2" group.
To post to this group, send email to symfony2-/***@public.gmane.org
To unsubscribe from this group, send email to
symfony2+unsubscribe-/***@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/symfony2?hl=en
---
You received this message because you are subscribed to the Google Groups "Symfony2" group.
To unsubscribe from this group and stop receiving emails from it, send an email to symfony2+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.
Ashish Awasthi
2013-12-30 09:07:55 UTC
Permalink
hi,

I think you should increase your memory limit in php.in, its by default
128M = 134217728 bytes so may be that could help you.
Post by Andy Baird
I'm currently deploying my Symfony2 app to AWS small instances (1.7G
memory) behind a load balancer.
I believe my codebase may have reached a point where clearing the cache
now causes memory errors. When I perform an app/console cache:clear
Clearing the cache for the prod environment with debug false
PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried
to alocate 4304 bytes) in
/home/app/www/production/vendor/symfony/symfony/src/ymfony/Component/Filesystem/Filesystem.php
on line 132
It doesn't appear to have any negative side affects - the web app keeps
running just fine, but this seems alarming to me. Is there anything I can
do to fix or further investigate this?
--
--
If you want to report a vulnerability issue on Symfony, please read the
procedure on http://symfony.com/security
You received this message because you are subscribed to the Google Groups "Symfony2" group.
To unsubscribe from this group, send email to
For more options, visit this group at
http://groups.google.com/group/symfony2?hl=en
---
You received this message because you are subscribed to the Google Groups "Symfony2" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/groups/opt_out.
--
Thanks and Regards
Ashish Awasthi
--
--
If you want to report a vulnerability issue on Symfony, please read the procedure on http://symfony.com/security

You received this message because you are subscribed to the Google
Groups "Symfony2" group.
To post to this group, send email to symfony2-/***@public.gmane.org
To unsubscribe from this group, send email to
symfony2+unsubscribe-/***@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/symfony2?hl=en
---
You received this message because you are subscribed to the Google Groups "Symfony2" group.
To unsubscribe from this group and stop receiving emails from it, send an email to symfony2+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.
Halil Özgür
2014-01-02 06:51:43 UTC
Permalink
I fixed this by raising memory limit from 128M to 256M in CLI php.ini (e.g.
/etc/php5/cli/php.ini in Ubuntu).
Post by Andy Baird
I'm currently deploying my Symfony2 app to AWS small instances (1.7G
memory) behind a load balancer.
I believe my codebase may have reached a point where clearing the cache
now causes memory errors. When I perform an app/console cache:clear
Clearing the cache for the prod environment with debug false
PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried
to alocate 4304 bytes) in
/home/app/www/production/vendor/symfony/symfony/src/ymfony/Component/Filesystem/Filesystem.php
on line 132
It doesn't appear to have any negative side affects - the web app keeps
running just fine, but this seems alarming to me. Is there anything I can
do to fix or further investigate this?
--
--
If you want to report a vulnerability issue on Symfony, please read the procedure on http://symfony.com/security

You received this message because you are subscribed to the Google
Groups "Symfony2" group.
To post to this group, send email to symfony2-/***@public.gmane.org
To unsubscribe from this group, send email to
symfony2+unsubscribe-/***@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/symfony2?hl=en
---
You received this message because you are subscribed to the Google Groups "Symfony2" group.
To unsubscribe from this group and stop receiving emails from it, send an email to symfony2+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.
Loading...