当前位置:网站首页>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 ).
边栏推荐
- 【微信小程序:缓存操作】
- JEditableTable的使用技巧
- Iptables' state module (FTP service exercise)
- 使用AGC重签名服务前后渠道号信息异常分析
- Implementation of navigation bar at the bottom of applet
- IP地址的类别
- Are you holding back on the publicity of the salary system for it posts such as testing, development, operation and maintenance?
- JS的操作
- Input of mathematical formula of obsidan
- Shell script for changing the current folder and the file date under the folder
猜你喜欢
![Other 7 features of TCP [sliding window mechanism ▲]](/img/ff/c3f52a7b89804acfd0c4f3b78bc4a0.jpg)
Other 7 features of TCP [sliding window mechanism ▲]

Virtual address space

为什么要选择云原生数据库

Why choose cloud native database

2-3查找樹

2 - 3 arbre de recherche

如何在HarmonyOS应用中集成App Linking服务

Golang compilation constraint / conditional compilation (/ / +build < tags>)

Input of mathematical formula of obsidan
![Upload an e-office V9 arbitrary file [vulnerability recurrence practice]](/img/e7/278193cbc2a2f562270f99634225bc.jpg)
Upload an e-office V9 arbitrary file [vulnerability recurrence practice]
随机推荐
Category of IP address
Calling the creation engine interface of Huawei game multimedia service returns error code 1002, error message: the params is error
Gson转换实体类为json时报declares multiple JSON fields named
Redis summary
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
Novice entry SCM must understand those things
2-3 lookup tree
对API接口或H5接口做签名认证
About using CDN based on Kangle and EP panel
Greenplum6.x搭建_环境配置
Componentspace2022, assertions, protocols, bindings, and configuration files
详解华为应用市场2022年逐步减少32位包体上架应用和策略
Image segmentation in opencv
PLSQL的安装和配置
【踩坑】nacos注册一直连接localhost:8848,no available server
[Chongqing Guangdong education] accounting reference materials of Nanjing University of Information Engineering
A bug using module project in idea
[Chongqing Guangdong education] audio visual language reference materials of Xinyang Normal University
国标GB28181协议视频平台EasyGBS新增拉流超时配置
Greenplum6.x常用语句