Home > Development Tools > composer > What should I do if composer runs out of memory? Two step solution!

What should I do if composer runs out of memory? Two step solution!

藏色散人
Release: 2021-11-17 14:28:30
forward
2795 people have browsed it

This article is written by the tutorial column of composer to introduce to you the problem of insufficient memory in composer. I hope it will be helpful to friends in need!

What should I do if composer runs out of memory? Two step solution!

composer Insufficient memory?

The error message is as follows

PHP Fatal error: Allowed memory size of 1610612736 bytes exhausted (tried to allocate 4096 bytes) in phar:///usr/local/bin/composer/src/Composer/DependencyResolver/Solver.php on line 223
Fatal error: Allowed memory size of 1610612736 bytes exhausted (tried to allocate 4096 bytes) in phar:///usr/local/bin/composer/src/Composer/DependencyResolver/Solver.php on line 223
Check getcomposer.org/doc/article… for more info on how to handle out of memory errors.
Copy after login

#Cause Insufficient memory

Solution

1. Modify php.ini

2. Temporarily release the memory limit when executing composer

COMPOSER_MEMORY_LIMIT =-1 composer require "package name"

###

The above is the detailed content of What should I do if composer runs out of memory? Two step solution!. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:juejin.im
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template