Issue
Pipelines builds that run "composer install" are failing with this, or similar, message in pipelines logs:
Killed composer install -v
You may also see the following, with no detail.
System Failure
Pipelines container running out of memory is one way that pipelines can run into a system failure.
Resolution
Check the "composer.lock" file into your code repository. This will reduce the memory requirements of running "composer install" in this pipelines container.
Cause
Resources on the pipelines container are limited, and exceeding those limits can cause pipelines jobs to fail. Those resources defined here: https://docs.acquia.com/acquia-cloud/container/resources/
Running "composer install" without a lock file will use a LOT more memory than running the same with the lock file. This can be demonstrated by running the following tests:
Test memory usage without lock file:
-
Remove vendor folder (rm -rf vendor)
-
Clear composer cache (composer clearcache)
-
Remove composer.lock file (rm composer.lock)
-
Run an install and report memory consumption (composer install --profile)
[258.2MB/109.74s] Memory usage: 258.23MB (peak: 496.64MB), time: 109.74s
Test memory usage with lock file:
-
Remove vendor folder (rm -rf vendor)
-
Clear composer cache (composer clearcache)
-
Run an install and report memory consumption (composer install --profile)
[8.1MB/64.02s] Memory usage: 8.13MB (peak: 49.72MB), time: 64.02s
In the test outlined above, running "composer install" with the lock file in place used 8.13MB of memory.
Running "composer install" without the lock file and forcing composer to generate it used 258.23MB of memory for the same project.