composer update memory overflow and stuck inaction problems

Memory overflow

  • First run free -m look at how much space is
  • In the command line environment in order to run the following three commands
dd if=/dev/zero of=/var/swap.1 bs=1M count=1024
mkswap /var/swap.1
swapon /var/swap.1
dd  IF = / dev / ZERO of = / var / the swap. . 1 BS = 1M COUNT = 1024    // first instruction 
1024 + 0 Records in     // this is returned 
1024 + 0 Records OUT    // this is returned SUMMARY 
1073741824 bytes ( 1.1 GB) copied appears, 10.0607 S, 107 MB / S     // this is returned
the mkswap / var / the swap. . 1    // second instruction 
the Setting up Version swapspace . 1 , size = 1048572 KiB    // This is the content returned 
NO label, the UUID = f6280c41-21b4- 4039 -bc3e-c26284b47b0c    // this is returned content
. the swapon / var / the swap . 1   // third instruction is 
the swapon:. / var / the swap . 1 : Permissions in the insecure 0644 , 0600 Suggested.    // This is what is returned

 

Explanation #: 
# dd . Copied from / dev / zero device a file size 1G / var / swap . 1 
# mkswap format . / Var / swap . 1 
# swapon swap partition to hang on to the file system 
# enter Free -m View memory usage information

The last execution was successful composer update again

 

Stuck inaction: Replace the source composer

composer config  -g repo.packagist composer https://packagist.phpcomposer.com

or

composer config -g repos.packagist composer https://mirrors.cloud.tencent.com/composer/

Guess you like

Origin www.cnblogs.com/bafeiyu/p/12486970.html