mysql docker oom_为什么内核 kill OOM 导致 Dockerd 死掉

问题描述

我在使用 k8s 私有云的过程中,由于 jvm 和 docker 内存限定问题,总是触发内核的 OOM。但是触发了内核的 OOM 之后,dockerd 就有可能死掉,完全无反应。

1a2c5fcb80c2ed5f0a9a23ba04a32e33.png

docker images 可以用

docker ps 可以用

docker run -it nginx sh 卡死无响应

service docker restart 卡死无响应

reboot 卡死无响应

问题出现的环境背景及自己尝试过哪些方法

操作系统

CentOS Linux release 7.4.1708 (Core)

Linux x 3.10.0-693.2.2.el7.x86_64 #1 SMP Tue Sep 12 22:26:13 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

Docker

Client:

Version: 18.06.1-ce

API version: 1.38

Go version: go1.10.3

Git commit: e68fc7a

Built: Tue Aug 21 17:23:03 2018

OS/Arch: linux/amd64

Experimental: false

Server:

Engine:

Version: 18.06.1-ce

API version: 1.38 (minimum version 1.12)

Go version: go1.10.3

Git commit: e68fc7a

Built: Tue Aug 21 17:25:29 2018

OS/Arch: linux/amd64

Experimental: false

我曾尝试关掉内核的 OOM kill 机制,但是没有生效。

sysctl -p

net.ipv6.conf.all.disable_ipv6 = 1

net.ipv6.conf.default.disable_ipv6 = 1

net.ipv6.conf.lo.disable_ipv6 = 1

vm.swappiness = 0

net.ipv4.neigh.default.gc_stale_time = 120

net.ipv4.conf.all.rp_filter = 0

net.ipv4.conf.default.rp_filter = 0

net.ipv4.conf.default.arp_announce = 2

net.ipv4.conf.lo.arp_announce = 2

net.ipv4.conf.all.arp_announce = 2

net.ipv4.tcp_max_tw_buckets = 5000

net.ipv4.tcp_syncookies = 1

net.ipv4.tcp_max_syn_backlog = 1024

net.ipv4.tcp_synack_retries = 2

kernel.sysrq = 1

vm.overcommit_memory = 2

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值