JAVA進程無故退出而沒有留下LOG?
LINUX通常有個OOM KILLER進程,對于他認為吃內存的進程,會根據(jù)一定的算分,執(zhí)行kill -9殺掉,查看日志如下:#less /tmp/messages
Feb 20 03:55:09 ip kernel: Out of memory: Kill process 5974 (java) score 494 or sacrifice child
Feb 20 03:55:09 ip kernel: Killed process 5974 (java), UID 1001, total-vm:23674020kB, anon-rss:17503912kB, file-rss:0kB, shmem-rss:0kB
Feb 20 03:55:09 ip kernel: Out of memory: Kill process 5974 (java) score 494 or sacrifice child
Feb 20 03:55:09 ip kernel: Killed process 5974 (java), UID 1001, total-vm:23674020kB, anon-rss:17503912kB, file-rss:0kB, shmem-rss:0kB
那如何屏蔽呢?
#/etc/cron.d/oom_disable
*/1**** root pgrep -f "java" | while read PID;do echo -17 > /proc/$PID/oom_adj;done參考文檔:
Linux內核OOM機制的詳細分析
http://blog.chinaunix.net/uid-29242873-id-3942763.html
posted on 2020-02-20 15:57 paulwong 閱讀(904) 評論(0) 編輯 收藏 所屬分類: 性能優(yōu)化 、LINUX