Out of memory: Kill process 25280 (php-fpm) score 86 or sacrifice child
php-fpm 耗尽服务器内存的办法
java服务今天突然宕机,通过 cat /var/log/messages进行查看,发现是系统内存溢出导致系统把java的进程杀掉了

使用top查看系统内存使用情况结果内存都被php-fpm占满了,使用/etc/init.d/php-fpm restart 重启php-fpm结果发现仍然还占了很多进程,百度之后发现需要限制一下php-fpm的进程数
vi /etc/php/php-fpm.conf
查看相关设置,发现进程数太多了,服务器根本承载不了那么多就挂了,只能把相关参数设置小一些
pm.max_children = 100 # 系统允许同时运行的php-fpm子进程最大数量
pm.start_servers = 5 # php-fpm父进程启动时派生出来的子进程数量
pm.min_spare_servers = 5 # php-fpm空闲子进程的最小数量
pm.max_spare_servers = 35 # php-fpm空闲子进程的最大数量
修改后为以下参数
pm.max_children = 10
pm.start_servers = 2
pm.min_spare_servers = 1
pm.max_spare_servers = 3

重启后,发现剩下的php-fpm只剩下了3个。
目前还没发现问题,如果有问题,就往大再修改一下。
Out of memory: Kill process 25280 (php-fpm) score 86 or sacrifice child的更多相关文章
- linux 终端报错 Out of memory: Kill process[PID] [process name] score问题分析
从Out of memory来看是内存超出了,后面的 Kill process[PID] [process name] score好像和进程有关了,下面我们就一起来看看linux 终端报错 Out o ...
- Mongodb副本集--Out of memory: Kill process 37325 (mongod)
1.Mongodb副本集--Out of memory: Kill process 37325 (mongod) 场景描述: 恢复一个22TB数据的mongodb实例的时候. 将备用结点加入mongo ...
- 理解和配置Out of memory: Kill process
转自:爱开源 理解 OOM killer 最近有位 VPS 客户抱怨 MySQL 无缘无故挂掉,还有位客户抱怨 VPS 经常死机,登陆到终端看了一下,都是常见的 Out of memory 问题.这通 ...
- Out of memory: Kill process 内存不足
服务直接被 killed,感觉特别奇怪.代码肯定是没有问题的,但为什么放到服务器上就出错了呢. 部署时报错如下: Failed to add the deployment content to the ...
- Out of memory: Kill process 6033 (mysqld) score 85 or sacrifice child
进入正题前先说明:OOM killer什么时候出现? linux下允许程序申请比系统可用内存更多的内存,这个特性叫Overcommit.这样做是出于优化系统考虑,因为不是所有的程序申请了内存就立刻使用 ...
- Kill Process by Name
Kill Process by Name(works in: Microsoft Windows 95/98/ME/NT/2000/XP)It is sometimes necessary to te ...
- Android Kill Process
/********************************************************************** * Android Kill Process * 说明: ...
- [LeetCode] Kill Process 结束进程
Given n processes, each process has a unique PID (process id) and its PPID (parent process id). Each ...
- 582. Kill Process杀死所有子代
[抄题]: Given n processes, each process has a unique PID (process id) and its PPID (parent process id) ...
随机推荐
- 京东面试题:Java中 ++i 的操作是线程安全的么?为什么?如何使其线程安全呢?
你真的了解volatile关键字吗?http://blog.csdn.net/FansUnion/article/details/79495080 面试题:为什么最后两行没有运行?http://blo ...
- Springboot application 本地HTTPS配置
使用keytool 命令,生成一个数字证书: keytool -genkey -alias tomcathttps -keyalg RSA -keysize 2048 -keystore key.p1 ...
- legend3---Homestead中Laravel项目502 Bad Gateway
legend3---Homestead中Laravel项目502 Bad Gateway 一.总结 一句话总结: 用查看错误日志的方法解决错误:(/var/log/nginx/.log) 1.home ...
- linux 上使用libxls读和使用xlslib写excel的方法简介
读取excel文件:libxls-1.4.0.zip下载地址:http://sourceforge.net/projects/libxls/安装方法: ./configure make make ...
- linux 汇编函数调用
edi第一个参数 esi第二个参数 edx第三个参数 rax保存结果 C++代码如下: char* demo(char* a,int b){ static char* buf=0; if(!buf)b ...
- 【后台管理系统】—— Ant Design Pro 项目爬坑(一)
1.表单rule中可以分对象处理不同规则 <FormItem label="类型名称" {...formLayout}> { form.getFieldDecorato ...
- 思科端口聚合的命令是channel-group
锐捷设备的端口聚合命令是: int range f0/1-2 port-group 1 --------------------- == 思科设备的端口聚合 是: int range f0/1-2 c ...
- 用Vue来实现音乐播放器(二十三):音乐列表
当我们将音乐列表往上滑的时候 我们上面的歌手图片部分也会变小 当我们将音乐列表向下拉的时候 我们的图片会放大 当我们将音乐列表向上滑的时候 我们的图片有一个高斯模糊的效果 并且随着我们的列 ...
- np.random.shuffle(x)与np.random.permutation(x)
来自:https://blog.csdn.net/brucewong0516/article/details/79012233 将数组打乱随机排列 两种方法: np.random.shuffle(x) ...
- Web.Config全攻略
一.认识Web.config文件 Web.config 文件是一个xml文本文件,它用来储存 asp.NET Web 应用程序的配置信息(如最常用的设置asp.NET Web 应用程序的身份验证方 ...