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

[1.x] Fix composer memory limit crashes #412

Merged
merged 2 commits into from
Oct 29, 2020
Merged

[1.x] Fix composer memory limit crashes #412

merged 2 commits into from
Oct 29, 2020

Conversation

claudiodekker
Copy link
Contributor

@claudiodekker claudiodekker commented Oct 29, 2020

This PR fixes an issue where Composer (1.x?) runs out of memory while Jetstream installs stack-dependent packages.
I personally ran into this issue a few weeks ago, but after seeing others on the Inertia.js discord run into it today, I decided to PR it.

Basically, what they'll see is the following:

Fatal error: Allowed memory size of 1610612736 bytes exhausted (tried to allocate 4096 bytes) in phar:https:///usr/local/Cellar/composer/1.10.8/bin/composer/src/Composer/DependencyResolver/RuleWatchGraph.php on line 52
PHP Fatal error:  Allowed memory size of 1610612736 bytes exhausted (tried to allocate 4096 bytes) in phar:https:///usr/local/Cellar/composer/1.10.8/bin/composer/src/Composer/DependencyResolver/RuleWatchGraph.php on line 52

By setting the COMPOSER_MEMORY_LIMIT=-1 environment variable, we temporarily unrestrict composer's memory limit to allow for the install to succeed on the first try.

@taylorotwell taylorotwell merged commit 9034198 into laravel:1.x Oct 29, 2020
@claudiodekker claudiodekker deleted the fix-composer-crash branch October 29, 2020 15:37
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

Successfully merging this pull request may close these issues.

None yet

2 participants