Missed Team ’24? Catch up on announcements here.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Memory exhausted on composer install

Najmus Saqib November 26, 2019

I am trying to run PHP CS on a simple laravel app. It fails with following message when it tries to install composer scripts

Fatal error: Allowed memory size of 1610612736 bytes exhausted (tried to allocate 32 bytes) in phar:///usr/local/bin/composer/src/Composer/DependencyResolver/Rule2Literals.php on line 48

My pipeline conf

options:
docker: true
size: 2x

pipelines:
default:
- step:
environment:
COMPOSER_MEMORY_LIMIT: 3G
script:
- php -r "echo ini_get('memory_limit').PHP_EOL;"
- composer install --no-scripts
#- mkdir ./test-reports
#- touch ./test-reports/phpcs.xml
#- vendor/bin/phpcs --report=junit --report-file=./test-reports/phpcs.xml app
- vendor/bin/phpmd app xml codesize,unusedcode,naming,cleancode,design,unusedcode --report-file=./test-reports/phpmd.xml
- vendor/bin/phpunit --log-junit ./test-reports/junit.xml

1 answer

1 accepted

0 votes
Answer accepted
Najmus Saqib June 2, 2020

@pohlen  Was able to solve the problem using Multi stage build

https://dev.to/nsaqib/setting-up-bitbucket-pipelines-for-laravel-4c39

pohlen June 2, 2020

Thanks!

I also got it working with `COMPOSER_MEMORY_LIMIT=-1 composer install`

Like Mrunmyee Mhatre likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events