Skip to content
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

Possible to use more than 512MB of memory #61

Open
nexxai opened this issue May 18, 2019 · 3 comments
Open

Possible to use more than 512MB of memory #61

nexxai opened this issue May 18, 2019 · 3 comments

Comments

@nexxai
Copy link

nexxai commented May 18, 2019

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!

@edbizarro
Copy link
Owner

edbizarro commented May 19, 2019

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');";

@nexxai
Copy link
Author

nexxai commented May 19, 2019

Awesome, thank you so much!

@j3j5
Copy link

j3j5 commented Jun 12, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants