当前位置:网站首页>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 ).
边栏推荐
- POJ - 3616 Milking Time(DP+LIS)
- Analysis of using jsonp cross domain vulnerability and XSS vulnerability in honeypot
- PLSQL的安装和配置
- [Chongqing Guangdong education] audio visual language reference materials of Xinyang Normal University
- How to integrate app linking services in harmonyos applications
- 求有符号数的原码、反码和补码【C语言】
- [Yu Yue education] basic reference materials of electrical and electronic technology of Nanjing Institute of information technology
- Tronapi-波场接口-源码无加密-可二开--附接口文档-基于ThinkPHP5封装-作者详细指导-2022年7月6日-新手快速上手-可无缝升级tp6版本
- 为什么要选择云原生数据库
- Greenplum6.x搭建_环境配置
猜你喜欢
Why choose cloud native database
Iptables' state module (FTP service exercise)
南京商品房买卖启用电子合同,君子签助力房屋交易在线网签备案
Through the "last mile" of legal services for the masses, fangzheng Puhua labor and personnel law self-service consulting service platform has been frequently "praised"
Routing information protocol rip
2-3查找树
About using CDN based on Kangle and EP panel
Data type - floating point (C language)
Virtual address space
[Yugong series] February 2022 U3D full stack class 007 - production and setting skybox resources
随机推荐
Data analysis methodology and previous experience summary 2 [notes dry goods]
使用AGC重签名服务前后渠道号信息异常分析
Introduction to data fragmentation
[Yu Yue education] basic reference materials of electrical and electronic technology of Nanjing Institute of information technology
[kuangbin]专题十五 数位DP
How to integrate app linking services in harmonyos applications
2-3查找树
Opencv learning note 3 - image smoothing / denoising
[wechat applet: cache operation]
【踩坑】nacos注册一直连接localhost:8848,no available server
【微信小程序:缓存操作】
Implementation of navigation bar at the bottom of applet
Merge sort and non comparison sort
字符串操作
NCS Chengdu New Electric interview Experience
Gson转换实体类为json时报declares multiple JSON fields named
Golan idea IntelliJ cannot input Chinese characters
Greenplum6.x搭建_环境配置
Teach you how to select PCB board by hand (II)
[Yugong series] February 2022 U3D full stack class 005 unity engine view