64714

PHP Fatal error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 16777216 bytes

Question:

I ran <strong>composer install</strong> on my 16 GB Mac Book Pro, and I got this

⚡️ distributor-portal composer install Loading composer repositories with package information Updating dependencies (including require-dev) PHP Fatal error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 16777216 bytes) in phar:///usr/local/bin/composer/src/Composer/DependencyResolver/Solver.php on line 220 Fatal error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 16777216 bytes) in phar:///usr/local/bin/composer/src/Composer/DependencyResolver/Solver.php on line 220 Check https://getcomposer.org/doc/articles/troubleshooting.md#memory-limit-errors for more info on how to handle out of memory errors.⚡️ distributor-portal <hr />

<strong>which php</strong>

/usr/local/php5/bin/php

<strong>php --version</strong>

PHP 7.1.4 (cli) (built: May 6 2017 10:02:00) ( NTS ) Copyright (c) 1997-2017 The PHP Group Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies with Zend OPcache v7.1.4, Copyright (c) 1999-2017, by Zend Technologies

<strong>cd /usr/local/; ls -lrt</strong>

total 0 lrwxr-xr-x 1 root wheel 26B Jan 23 2017 openssl@ -> mac-dev-env/openssl-1.1.0c lrwxr-xr-x 1 root wheel 37B Jul 5 2017 php5@ -> /usr/local/php5-7.1.4-20170506-100436 lrwxr-xr-x 1 root wheel 30B Oct 9 2017 mysql@ -> mysql-5.7.19-macos10.12-x86_64 -rw-r--r-- 1 root wheel 0B Dec 12 14:47 .com.apple.installer.keep drwxr-xr-x@ 10 root wheel 320B Dec 12 15:51 ../ drwxr-xr-x 3 root wheel 96B Dec 12 15:52 mac-dev-env/ drwxr-xr-x 3 root wheel 96B Dec 12 15:53 remotedesktop/ drwxr-xr-x 21 root wheel 672B Dec 12 15:53 ./ drwxr-xr-x 15 bheng admin 480B Dec 12 15:53 etc/ drwxr-xr-x 14 501 wheel 448B Dec 12 15:54 packager/ drwxr-xr-x 25 bheng admin 800B Dec 12 15:54 share/ drwxr-xr-x 14 root wheel 448B Dec 12 15:54 php5-7.1.4-20170506-100436/ drwxr-xr-x 71 bheng admin 2.2K Dec 12 15:54 Cellar/ drwxr-xr-x 11 bheng admin 352B Dec 12 15:54 var/ drwxr-xr-x 396 bheng admin 12K Dec 12 15:54 bin/ drwxr-xr-x 13 bheng admin 416B Dec 12 15:54 php5-5.6.14-20151002-085853/ drwxr-xr-x 80 bheng admin 2.5K Dec 12 15:54 opt/ drwxr-xr-x 13 root wheel 416B Dec 12 15:54 mysql-5.7.19-macos10.12-x86_64/ drwxr-xr-x 17 bheng admin 544B Dec 12 15:54 Homebrew/ drwxr-xr-x 122 bheng admin 3.8K Dec 12 15:54 include/ drwxr-xr-x 231 bheng admin 7.2K Dec 12 15:54 lib/

How would one go about debugging this further?

Answer1:

Your machine might have 16GB installed but PHP is not configured to use it. Locate your php.ini file (on OSX with PHP installed by Homebrew its at /usr/local/etc/php/$PHP_VERSION/php.ini. Open it with an editor and search for memory_limit. There you specify how much memory a PHP process can use. If you like to give it <em>all</em> change the value to -1.

$PHP_VERSION is the version of your PHP installation. To figure out which is installed use php --version.

Recommend

  • How to properly install and set up Flambe?
  • Write data to .properties file in assets directiry
  • Could not copy “obj\\Debug\\{project}.dll” to “bin\\{project}.dll”
  • Rails - confused by URL change when model validations fail
  • Emulate XMP tag with script tag and allow to copy content
  • Why is Python's “sorted()” slower than “copy, then .sort()”
  • Can -std=c99 prevent my #includes from working properly?
  • Is there a way to sort the firebaserecyclerview after I calculate value after retrieving data?
  • Pandas Subset of a Time Series Without Resampling
  • Added String to ArrayList not shown / not updated [duplicate]
  • how do I cluster a list of geographic points by distance?
  • implementing euclidean distance based formula using numpy
  • How to open a serial port with pyserial?
  • How to Export CSV file from ASP.NET core
  • How to populate a Mutation for a different Cassandra table in a trigger
  • How do I force ASP.NET Ajax to use a script from the FS and not WebResource.axd, or to reduce its HT
  • can I build CMakeLists.txt from a set of smaller files (to improve the readability and maintainabili
  • async GET request with body from browser
  • Running iPhone crash Logs from testers on XCode
  • if you have a DLL creating a bitmap in memory, how to return it to the browser?
  • How to run Daphne Server (Django Channels) & workers in the background?
  • How can i use JQuery fadeTo() in IE 7?
  • Simultaneous animation when entering editing mode of UITableViewCell
  • Draw 9 patch dotted /dashed line on Android
  • How to put an object in the air?
  • Why do you need 2 Javascript files for cross-platform Cordova plugin?
  • Julia 1.0 UndefVarError - Scope of Variable
  • Add checkbox dynamically using angular 2
  • how can i get selectedRange.location value?
  • Generate and export point cloud from Project Tango
  • select an input by value?
  • Ember.js + JQuery-UI Tooltip - Tooltip does not reflect the model / controller changes
  • How to check if a database and tables exist in sql server in a vb .net project?
  • How to use Kaminari pagination gem with Sinatra and Mongoid?
  • JQuery: Infinite input select
  • 'url' requires a non-empty first argument. The syntax changed in Django 1.5, see the docs
  • How do I add a mouse over tooltip to an Image using .DrawImage()
  • media foundation H264 decoder not working properly