-
Notifications
You must be signed in to change notification settings - Fork 336
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Memory exhaused error for docker install #957
Comments
@rkhyd I was facing the same issues, tried few different methods to change the composer memory limit as outlined in https://getcomposer.org/doc/articles/troubleshooting.md#memory-limit-errors but to no avail. I could get it to work by adding these two lines before the
Credits: Solution from this stackoverflow post. UPDATE: The correct solution would most likely be to change the COMPOSER_VERSION argument at the beginning of Dockerfile from
and adding the Tested both approaches to be working. But it appears this docker setup is not maintained as all the versions are quite outdated, e.g. alpine version 3.15 where the latest combination of php 8.1 and alpine is Would be nice to hear about the plans from Sylius for this. |
Hello @dhenze and @rkhyd I re-test the last release of You can simply edit the new |
@Prometee this is not true in my case, just tried the latest release of |
@patbsh are you sure your fork the last version ? |
@Prometee I used When it crashed due to memory limit I simply went into the newly created directory and re-run |
@patbsh it seems you are using your local PHP binary instead of the docker one doing so. Usually the memory issue is coming from XDebug extension being enabled, what I suspect is that your local PHP install has it, making the memory blowing up. |
@Prometee you are right, after cloning the repository directly it runs without any tweaking. Thanks! |
When i run docker-compose up -d or docker compose -f docker-compose.prod.yml up -d, i get the "Fatal error: Allowed memory size of 1610612736 bytes exhausted" in both cases.
I added - COMPOSER_MEMORY_LIMIT=-1 to the environment of php service, added mem_limit: 5g as well. But the install fails.
here is the output
` => [html-migrations internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 5.24kB 0.0s
=> [html-nginx internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 5.24kB 0.0s
=> [html-node internal] load metadata for docker.io/library/composer:2.4 0.8s
=> [html-migrations internal] load metadata for docker.io/mlocati/php-extension-installer:latest 1.1s
=> [html-migrations internal] load metadata for docker.io/library/node:16-alpine3.15 0.8s
=> [html-php internal] load metadata for docker.io/library/php:8.1-fpm-alpine3.15 0.8s
=> [html-php internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 5.24kB 0.0s
=> [html-node internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 5.24kB 0.0s
=> [html-nginx internal] load metadata for docker.io/library/nginx:1.21-alpine 0.8s
=> [html-nginx internal] load .dockerignore 0.0s
=> => transferring context: 463B 0.0s
=> [html-php internal] load .dockerignore 0.0s
=> => transferring context: 463B 0.0s
=> [html-node internal] load .dockerignore 0.0s
=> => transferring context: 463B 0.0s
=> [html-migrations internal] load .dockerignore 0.0s
=> => transferring context: 463B 0.0s
=> [html-nginx sylius_nginx 1/5] FROM docker.io/library/nginx:1.21-alpine@sha256:a74534e76ee1121d418fa7394ca930eb67440deda413848bc67c68138535b989 0.0s
=> [html-nginx internal] load build context 0.0s
=> => transferring context: 12.27kB 0.0s
=> [html-migrations sylius_node 1/13] FROM docker.io/library/node:16-alpine3.15@sha256:ecf74556cdeee48382e555a377ddb12d36161bd33349dc79290f733f763df711 0.0s
=> [html-migrations composer 1/1] FROM docker.io/library/composer:2.4@sha256:4d13375bfb862c565d269e2d3ad5c2db002d3299d0788770639164452bf84f3a 0.0s
=> [html-migrations php_extension_installer 1/1] FROM docker.io/mlocati/php-extension-installer:latest@sha256:f9b2171089d4d90b48dd8309acb17220d5fadb1fe9e6550b95d92f28ab88fed1 0.0s
=> [html-node base 1/23] FROM docker.io/library/php:8.1-fpm-alpine3.15@sha256:fc434d1e2897c4bbad93714eadd590af0900772b6dd4d3be48486ab8591abc48 0.0s
=> [html-node internal] load build context 0.0s
=> => transferring context: 10.50kB 0.0s
=> [html-php internal] load build context 0.0s
=> => transferring context: 10.69kB 0.0s
=> [html-migrations internal] load build context 0.0s
=> => transferring context: 13.22kB 0.0s
=> CACHED [html-nginx sylius_nginx 2/5] COPY docker/nginx/conf.d/default.conf /etc/nginx/conf.d/ 0.0s
=> CACHED [html-nginx sylius_nginx 3/5] WORKDIR /srv/sylius 0.0s
=> CACHED [html-nginx sylius_node 2/13] WORKDIR /srv/sylius 0.0s
=> CACHED [html-nginx sylius_node 3/13] RUN set -eux; apk add --no-cache --virtual .build-deps g++ gcc make ; 0.0s
=> CACHED [html-nginx sylius_node 4/13] COPY package.json yarn.* ./ 0.0s
=> CACHED [html-nginx sylius_node 5/13] RUN set -eux; yarn install; yarn cache clean 0.0s
=> CACHED [html-nginx base 2/23] RUN apk add --no-cache acl file gettext unzip ; 0.0s
=> CACHED [html-nginx base 3/23] COPY --from=php_extension_installer /usr/bin/install-php-extensions /usr/local/bin/ 0.0s
=> CACHED [html-nginx base 4/23] RUN install-php-extensions apcu exif gd intl pdo_mysql opcache zip 0.0s
=> CACHED [html-nginx base 5/23] COPY --from=composer /usr/bin/composer /usr/bin/composer 0.0s
=> CACHED [html-nginx base 6/23] COPY docker/php/prod/php.ini /usr/local/etc/php/php.ini 0.0s
=> CACHED [html-nginx base 7/23] COPY docker/php/prod/opcache.ini /usr/local/etc/php/conf.d/opcache.ini 0.0s
=> CACHED [html-nginx base 8/23] COPY config/preload.php /srv/sylius/config/preload.php 0.0s
=> CACHED [html-nginx base 9/23] RUN set -eux; composer clear-cache 0.0s
=> CACHED [html-nginx base 10/23] WORKDIR /srv/sylius 0.0s
=> CACHED [html-nginx base 11/23] COPY composer.* symfony.lock ./ 0.0s
=> ERROR [html-nginx base 12/23] RUN set -eux; composer install --prefer-dist --no-autoloader --no-interaction --no-scripts --no-progress --no-dev; composer clear-cache 41.9s
[html-nginx base 12/23] RUN set -eux; composer install --prefer-dist --no-autoloader --no-interaction --no-scripts --no-progress --no-dev; composer clear-cache:
#0 0.220 + composer install --prefer-dist --no-autoloader --no-interaction --no-scripts --no-progress --no-dev
#0 0.390 No composer.lock file present. Updating dependencies to latest instead of installing from lock file. See https://getcomposer.org/install for more information.
#0 0.390 Loading composer repositories with package information
#0 37.75 Updating dependencies
#0 41.41
#0 41.41 Fatal error: Allowed memory size of 1610612736 bytes exhausted (tried to allocate 67108864 bytes) in phar:///usr/bin/composer/src/Composer/DependencyResolver/Solver.php on line 190
#0 41.44
#0 41.44 Check https://getcomposer.org/doc/articles/troubleshooting.md#memory-limit-errors for more info on how to handle out of memory errors.
failed to solve: process "/bin/sh -c set -eux; composer install --prefer-dist --no-autoloader --no-interaction --no-scripts --no-progress --no-dev; composer clear-cache" did not complete successfully: exit code: 255
`
Any solution?
The text was updated successfully, but these errors were encountered: