dcoker突然宕机的问题排查

1.问题描述
docker突然宕机了

2.问题排查
查看日志,发现OOM,进程被杀掉了。
查看日志的命令:
grep “Out of memory” /var/log/*

root@instance-9yth8w98-1:/var/log# grep "Out of memory" /var/log/*
grep: /var/log/apt: Is a directory
grep: /var/log/dist-upgrade: Is a directory
grep: /var/log/fsck: Is a directory
/var/log/kern.log:Jun 23 08:41:19 instance-9yth8w98-1 kernel: [20035645.202681] Out of memory: Kill process 15387 (java) score 197 or sacrifice child
grep: /var/log/lxd: Is a directory
grep: /var/log/mysql: Is a directory
grep: /var/log/nginx: Is a directory
grep: /var/log/ntpstats: Is a directory
/var/log/syslog:Jun 23 08:41:19 instance-9yth8w98-1 kernel: [20035645.202681] Out of memory: Kill process 15387 (java) score 197 or sacrifice child
grep: /var/log/unattended-upgrades: Is a directory

3.解决问题
释放内存并将docker容器设置成自启动,
自启动命令:
docker update --restart=always course2_admin

4.文章参考链接
a. https://www.v2ex.com/t/525772
b. https://www.cnblogs.com/sunshine2016/p/8549955.html
c. https://blog.csdn.net/hecr_mingong/article/details/106901633

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值