Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

Debian 9 (1 GB RAM, 25 GB storage) Apache MariaDB PHP 7.2
Composer and Laravel installed successfully
Then, attempted to add a package with composer … ran following line in Putty composer require mobiledetect/mobiledetectlib
returned the following…
Using version ^2.8 for mobiledetect/mobiledetectlib ./composer.json has been updated Loading composer repositories with package information Updating dependencies (including require-dev)
mmap() failed: [12] Cannot allocate memory
mmap() failed: [12] Cannot allocate memory PHP Fatal error: Out of memory (allocated 878714880) (tried to allocate 4096 bytes) in phar:///usr/local/bin/composer/src/Composer/DependencyResolver/Solver.php on line 223
Fatal error: Out of memory (allocated 878714880) (tried to allocate 4096 bytes) in phar:///usr/local/bin/composer/src/Composer/DependencyResolver/Solver.php on line 223
Checked for the mobiledetect folder in /var/www/domainname/html/projectname/vendor but no folder there
Currently have 1 GB RAM in DigitalOcean, do I need to up it to 2 GB RAM for composer to run updates properly?
I ran the command … php -r “echo ini_get(‘memory_limit’).PHP_EOL;” and -1 was returned which means unlimited
I checked the php.ini file and found… ; Maximum amount of memory a script may consume (128MB) ; http://php.net/memory-limit memory_limit = -1
I used the ‘top’ command to view that only 1 % of CPU is in use
and free -m returns total used free shared buff/cache available Mem: 996 134 800 21 60 750
I read that composer increases internal memory to 1.5 GB here https://getcomposer.org/doc/articles/troubleshooting.md#memory-limit-errors
Any suggestions would be appreciated.
orbitstorm88
4aeef7a9e949440aacffb0b31ebfd3
Anjanesh Lekshminarayanan
84d5da8bd98b42eab341b951c1e59f
7aa9f68ad93048a792ee1efa1e1566
Tero
Juan Carlos Flores Hernandez
3093a2c8f8754064b8f588ac1c017
SwimmingTealEel
GiantGreenBlueAngler