Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Proc_open (): what about fork failed-Cannot allocate memory after installing composer

2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

The purpose of this article is to share with you what to do about the error proc_open (): fork failed-Cannot allocate memory after installing composer. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.

Proc_open (): fork failed-Cannot allocate memory after installing composer

1. Problem description:

"proc_open (): fork failed-Cannot allocate memory" appears when the linux server deploys the yii project using composer

That is, the prompt "out of memory", we can solve this problem by creating a swap partition.

two。 Solution:

Run free-m first to see how much space it is.

Run the following three commands in turn in the command line environment

Dd if=/dev/zero of=/var/swap.1 bs=1M count=1024mkswap / var/swap.1swapon / var/swap.1

For example: [the following is the result of my running on the server]

Dd if=/dev/zero of=/var/swap.1 bs=1M count=1024 / / the first instruction 10240records in / / this is the returned content 1024400records out / / this is the returned content 1073741824 bytes (1.1GB) copied, 10.0607 s, 107MB/s / / this is the returned content mkswap / var/swap.1 / / the second instruction Setting up swapspace version 1, size = 1048572 KiB / / this is the returned content no label UUID=f6280c41-21b4-4039-bc3e-c26284b47b0c / / this is the returned content swapon / var/swap.1 / / the third instruction swapon: / var/swap.1: insecure permissions 0644, 0600 suggested. / / this is the returned content

Explanation:

Dd copies a 1G file from / dev/zero device / var/swap.1mkswap format / var/swap.1swapon hangs the swap partition to the file system and type free-m to view memory usage information

Finally, the composer update is executed again and it is successful.

Thank you for reading! This is the end of the article on "reporting errors after installing composer proc_open (): what to do with fork failed-Cannot allocate memory". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it out for more people to see!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report