服务器 Out of memory 实在太难解决了
电商系统加了一个 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 childJun 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. 要不就增大内存,要不就优化程序,php是循环执行肯定很资源
页:
[1]