gitlab-ci-pipeline-php icon indicating copy to clipboard operation
gitlab-ci-pipeline-php copied to clipboard

Possible to use more than 512MB of memory

Open nexxai opened this issue 5 years ago • 3 comments

Hey there,

I love this image as it makes CI/CD for Laravel super easy so thank you for investing your own time on creating and maintaining it!! I'm trying to update my CI/CD process from using PHP w/ Xdebug to just using phpdbg which seems to run much quicker with the tradeoff being higher memory usage, but since your build script limits the memory usage to 512M (https://github.com/edbizarro/gitlab-ci-pipeline-php/blob/master/php/scripts/extensions.sh#L135), it fails quite quickly. Would it be possible to add a tag that allows more memory usage, like 4GB?

Thank you again!

nexxai avatar May 18 '19 18:05 nexxai

Hi @nexxai

Thanks for using my images!

Here a workaround until I find a way to change the .ini at runtime.

image: edbizarro/gitlab-ci-pipeline-php:7.4

cache:
  paths:
  - vendor/

test:
  script:
    - php -r "echo ini_get('memory_limit');";
    - cat /usr/local/etc/php/conf.d/zz-conf.ini
    - sudo rm -rf /usr/local/etc/php/conf.d/zz-conf.ini
    - echo "memory_limit=4G" | sudo tee -a /usr/local/etc/php/conf.d/zz-conf.ini
    - php -r "echo ini_get('memory_limit');";

edbizarro avatar May 19 '19 03:05 edbizarro

Awesome, thank you so much!

nexxai avatar May 19 '19 13:05 nexxai

FWIW, I'm using phpdbg as well and I just run the command like phpdbg -d memory_limit=1024M -qrr vendor/bin/phpunit --config=phpunit.xml.dist

j3j5 avatar Jun 12 '19 13:06 j3j5