Closed pfazzi closed 4 years ago
Hello @pfazzi.
This is a known behavior of composer
. It can requires huge amounts of memory and fail even with 2 GB.
However, 2 GB is already way too much compared to what Akeneo or any Symfony application should consume. This value is only set that high for development purpose, and should in fact be lower (like 512 MB max).
Regarding composer, the best solution is to manually set the memory, either with an environment variable or directly through the command line:
$ php -d memory_limit=3G /your/path/to/composer update
Thanks @damien-carcel, you're right. 3G is too much for a Symfony application. Anyway, just to allow composer run, I added in my docker-compose.override.yml (in dev machine) the following volume config:
services:
fpm:
volumes:
- ./docker/php/app_dev.ini:/etc/php/7.3/cli/conf.d/app_dev.ini
Where app_dev.ini
contains the custom app confinguration for dev purpose, including memory_limit = 3G
.
BTW I really like Akeneo docker containers and i'm using them in other symfony project, even based on Sylius. Great job guys!!!
Great solution indeed. I'm very happy our Docker images fit your needs :-).
PHP Fatal error: Allowed memory size of 2147483648 bytes exhausted
occurs when i try to install some new dependencies. Why don't you increase thememory_limit
inakeneo.ini
?