当前位置:网站首页>Redis fault handling "can't save in background: fork: cannot allocate memory“
Redis fault handling "can't save in background: fork: cannot allocate memory“
2022-07-07 08:48:00 【IChen.】
1. resolvent
(1) edit /etc/sysctl.conf add to
vm.overcommit_memory=1
(2) stay /etc Execute under directory sysctrl -p Make it effective
2.Linux Kernel parameters overcommit_memory
It is Memory allocation policy
Optional value :0、1、2.
0, Indicates that the kernel will check if there is enough memory available for the process to use ; If there is enough memory available , Memory request allows ; otherwise , Memory request failed , And return the error to the application process .
1, Indicates that the kernel is allowed to allocate all physical memory , Regardless of the current memory state .
2, Indicates that the kernel is allowed to allocate more memory than the sum of all physical memory and swap space
3. What is? Overcommit and OOM
Linux Most requests for memory are answered "yes", In order to run more and bigger programs . Because after applying for memory , Not immediately using memory . This technology is called Overcommit. When linux When there is not enough memory , It's going to happen OOM killer(OOM=out-of-memory). It will choose to kill some processes ( User state process , It's not a kernel thread ), To free up memory .
When oom-killer occurs ,linux Which processes will be killed ? The function for selecting a process is oom_badness function ( stay mm/oom_kill.c in ), The Function calculates the number of points per process (0~1000). The higher the number of points , The more likely this process is to be killed . The number of points per process followed by oom_score_adj of , and oom_score_adj Can be set (-1000 The minimum ,1000 The highest ).
边栏推荐
- How to add a mask of a target in a picture
- Tips for using jeditabletable
- leetcode134. gas station
- Greenplum6.x搭建_安装
- 说一个软件创业项目,有谁愿意投资的吗?
- 求有符号数的原码、反码和补码【C语言】
- Iptables' state module (FTP service exercise)
- [Yu Yue education] basic reference materials of electrical and electronic technology of Nanjing Institute of information technology
- JS operation
- FPGA knowledge accumulation [6]
猜你喜欢

下载和安装orcale database11.2.0.4

IP地址的类别
![[Nanjing University] - [software analysis] course learning notes (I) -introduction](/img/57/bf652b36389d2bf95388d2eb4772a1.png)
[Nanjing University] - [software analysis] course learning notes (I) -introduction

如何在快应用中实现滑动操作组件

快速集成认证服务-HarmonyOS平台

Exercise arrangement 2.10, 11

Installation and configuration of PLSQL

Routing information protocol rip

路由信息协议——RIP

What is the method of manual wiring in PCB design in 22protel DXP_ Chengdu electromechanical Development Undertaking
随机推荐
[Chongqing Guangdong education] audio visual language reference materials of Xinyang Normal University
Image segmentation in opencv
National standard gb28181 protocol video platform easygbs adds streaming timeout configuration
Three series of BOM elements
You should use Google related products with caution
xray的简单使用
[paper reading] icml2020: can autonomous vehicles identify, recover from, and adapt to distribution shifts?
Appeler l'interface du moteur de création du service multimédia de jeu Huawei renvoie le Code d'erreur 1002, le message d'erreur: les paramètres sont l'erreur
21 general principles of wiring in circuit board design_ Provided by Chengdu circuit board design
redis故障处理 “Can‘t save in background: fork: Cannot allocate memory“
All about PDF crack, a complete solution to meet all your PDF needs
Shell script for changing the current folder and the file date under the folder
为什么要选择云原生数据库
[machine learning] watermelon book data set_ data sharing
opencv之图像分割
SSM integration
2-3查找树
JEditableTable的使用技巧
Category of IP address
Download and install orcale database11.2.0.4