当前位置:网站首页>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 ).
边栏推荐
- Three usage scenarios of annotation @configurationproperties
- Input and output of floating point data (C language)
- Grpc, oauth2, OpenSSL, two-way authentication, one-way authentication and other column directories
- A bug using module project in idea
- NCS Chengdu Xindian interview experience
- 2 - 3 arbre de recherche
- Componentspace2022, assertions, protocols, bindings, and configuration files
- 路由信息协议——RIP
- Go语言中,函数是一种类型
- let const
猜你喜欢

iptables 之 state模块(ftp服务练习)

xray的简单使用

Installation and configuration of PLSQL

2 - 3 arbre de recherche

联想混合云Lenovo xCloud:4大产品线+IT服务门户
![FPGA knowledge accumulation [6]](/img/db/c3721c3e842ddf4c1088a3f54e9f2a.jpg)
FPGA knowledge accumulation [6]
![Data analysis methodology and previous experience summary 2 [notes dry goods]](/img/e1/643e847a777e1effcbd39f8b009e2b.png)
Data analysis methodology and previous experience summary 2 [notes dry goods]

MySQL introduction - crud Foundation (establishment of the prototype of the idea of adding, deleting, changing and searching)

Analysis of using jsonp cross domain vulnerability and XSS vulnerability in honeypot

What is the method of manual wiring in PCB design in 22protel DXP_ Chengdu electromechanical Development Undertaking
随机推荐
POJ - 3616 Milking Time(DP+LIS)
基本数据类型和string类型互相转化
Thirteen forms of lambda in kotlin
数据库存储---表分区
Virtual address space
National SMS center number inquiry
Greenplum 6.x version change record common manual
oracle一次性说清楚,多种分隔符的一个字段拆分多行,再多行多列多种分隔符拆多行,最终处理超亿亿。。亿级别数据量
POJ - 3616 Milking Time(DP+LIS)
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
数据分析方法论与前人经验总结2【笔记干货】
Data analysis methodology and previous experience summary 2 [notes dry goods]
uniapp 微信小程序监测网络
Frequently Asked Coding Problems
对API接口或H5接口做签名认证
A bug using module project in idea
Implementation of navigation bar at the bottom of applet
A method for quickly viewing pod logs under frequent tests (grep awk xargs kuberctl)
Composer change domestic image
Greenplum6.x重新初始化