VPS侦探论坛

 找回密码
 注册
查看: 2849|回复: 1

服务器 Out of memory 实在太难解决了

[复制链接]
发表于 2018-6-14 09:13:01 | 显示全部楼层 |阅读模式

电商系统加了一个 crond 定时任务,其次就是定时任务里面涉及到 PHP 的循环,大概 2 分钟一次,每天凌晨三四点钟,web 服务器就挂了,找到 /var/log/message 里面查看日志,日志如下,请问各位大牛这个怎么解决? 环境 centos lnmp 8G 内存 Jun 14 03:45:08 iZbp14dhkm7u57alou7jitZ kernel: Out of memory: Kill process 18931 (nginx) score 2 or sacrifice child
Jun 14 03:45:08 iZbp14dhkm7u57alou7jitZ kernel: Killed process 18931, UID 501, (nginx) total-vm:68052kB, anon-rss:23608kB, file-rss:28kB
Jun 14 03:45:09 iZbp14dhkm7u57alou7jitZ kernel: Out of memory: Kill process 18933 (nginx) score 2 or sacrifice child
Jun 14 03:45:09 iZbp14dhkm7u57alou7jitZ kernel: Killed process 18933, UID 501, (nginx) total-vm:68052kB, anon-rss:18376kB, file-rss:16kB
Jun 14 03:45:09 iZbp14dhkm7u57alou7jitZ kernel: Out of memory: Kill process 18932 (nginx) score 2 or sacrifice child
Jun 14 03:45:09 iZbp14dhkm7u57alou7jitZ kernel: Killed process 18932, UID 501, (nginx) total-vm:68052kB, anon-rss:23608kB, file-rss:8kB
Jun 14 07:17:55 iZbp14dhkm7u57alou7jitZ kernel: imklog 5.8.10, log source = /proc/kmsg started.
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2018-6-14 14:10:03 | 显示全部楼层


要不就增大内存,要不就优化程序,php是循环执行肯定很资源
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-9-24 01:23 , Processed in 0.025130 second(s), 17 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表