当前位置:网站首页>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 ).
边栏推荐
- IP guard helps energy enterprises improve terminal anti disclosure measures to protect the security of confidential information
- Arm GIC (IV) GIC V3 register class analysis notes.
- [machine learning] watermelon book data set_ data sharing
- MySQL partition explanation and operation statement
- Gson转换实体类为json时报declares multiple JSON fields named
- 更改当前文件夹及文件夹下文件日期shell脚本
- Greenplum 6.x reinitialization
- Are you holding back on the publicity of the salary system for it posts such as testing, development, operation and maintenance?
- You should use Google related products with caution
- ES6_ Arrow function
猜你喜欢
登山小分队(dfs)
AVL balanced binary search tree
Iptables' state module (FTP service exercise)
A method for quickly viewing pod logs under frequent tests (grep awk xargs kuberctl)
JS的操作
[南京大学]-[软件分析]课程学习笔记(一)-introduction
調用華為遊戲多媒體服務的創建引擎接口返回錯誤碼1002,錯誤信息:the params is error
联想混合云Lenovo xCloud:4大产品线+IT服务门户
Merge sort and non comparison sort
Category of IP address
随机推荐
对API接口或H5接口做签名认证
Golang compilation constraint / conditional compilation (/ / +build < tags>)
Arm GIC (IV) GIC V3 register class analysis notes.
Greenplum6.x重新初始化
All about PDF crack, a complete solution to meet all your PDF needs
What are the advantages of commas in conditional statements- What is the advantage of commas in a conditional statement?
如何在图片的目标中添加目标的mask
Basic data types and string types are converted to each other
如何理解分布式架构和微服务架构呢
How to realize the high temperature alarm of the machine room in the moving ring monitoring system
详解华为应用市场2022年逐步减少32位包体上架应用和策略
【踩坑】nacos注册一直连接localhost:8848,no available server
2-3查找树
最长上升子序列模型 AcWing 1017. 怪盗基德的滑翔翼
[Chongqing Guangdong education] accounting reference materials of Nanjing University of Information Engineering
MySQL partition explanation and operation statement
Required String parameter ‘XXX‘ is not present
Thirteen forms of lambda in kotlin
Gson转换实体类为json时报declares multiple JSON fields named
NCS Chengdu Xindian interview experience