Skip to content

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

Merged
taylorotwell merged 2 commits intolaravel:1.xfrom
claudiodekker:fix-composer-crash
Oct 29, 2020
Merged

[1.x] Fix composer memory limit crashes#412
taylorotwell merged 2 commits intolaravel:1.xfrom
claudiodekker:fix-composer-crash

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:///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:///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.

2 participants