赞
踩
笔者这两天经常发现部署在我自己服务器上的Jenkins(用Docker布的)用一阵就自动停掉了,需要再手动重启,使用docker ps -a
显示出来是这样的:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
795739f77022 jenkins/jenkins:lts "/sbin/tini -- /usr/…" 42 hours ago Exited (137) 36 hours ago jenkins
4ddc98eadfd7 opensecurity/mobile-security-framework-mobsf:latest "gunicorn -b 0.0.0.0…" 9 days ago Up 2 days 1337/tcp, 0.0.0.0:8000->8000/tcp fervent_proskuriakova
084abc97bd33 openstf/stf "stf local --public-…" 9 days ago Up 2 days stf
5b99435277dc sorccu/adb:latest "/sbin/tini -- adb -…" 9 days ago Up 2 days adbd
2d926ec1f677 rethinkdb "rethinkdb --bind al…" 9 days ago Up 2 days rethinkdb
3299e975bbbd silsuer/yapi "bash" 3 months ago Up 2 days 0.0.0.0:3000->3000/
想了各种原因,用了各种解决方案但是都不生效。监控看到服务器内存有点满,但是又没有爆,于是也没有特别在意,直到今天我再次运行,发现。。。
fatal error: runtime: out of memory
runtime stack:
runtime.throw(0x55c1051c2da1, 0x16)
/usr/local/go/src/runtime/panic.go:774 +0x74 fp=0x7ffc5cc3f1f8 sp=0x7ffc5cc3f1c8 pc=0x55c103c7bb24
runtime.sysMap(0xc000000000, 0x4000000, 0x55c106def498)
/usr/local/go/src/runtime/mem_linux.go:169 +0xc7 fp=0x7ffc5cc3f238 sp=0x7ffc5cc3f1f8 pc=0x55c103c65667
runtime.(*mheap).sysAlloc(0x55c106dd6100, 0x2000, 0x0, 0x0)
/usr/local/go/src/runtime/malloc.go:701 +0x1cf fp=0x7ffc5cc3f2e0 sp=0x7ffc5cc3f238 pc=0x55c103c5856f
runtime.(*mheap).grow(0x55c106dd6100, 0x1, 0xffffffff)
/usr/local/go/src/runtime/mheap.go:1255 +0xa5 fp=0x7ffc5cc3f330 sp=0x7ffc5cc3f2e0 pc=0x55c103c73805
runtime.(*mheap).allocSpanLocked(0x55c106dd6100, 0x1, 0x55c106def4a8, 0x1)
/usr/local/go/src/runtime/mheap.go:1170 +0x268 fp=0x7ffc5cc3f3b0 sp=0x7ffc5cc3f330 pc=0x55c103c73698
runtime.(*mheap).alloc_m(0x55c106dd6100, 0x1, 0x55c103ca002a, 0x0)
/usr/local/go/src/runtime/mheap.go:1022 +0xc6 fp=0x7ffc5cc3f400 sp=0x7ffc5cc3f3b0 pc=0x55c103c72f36
runtime.(*mheap).alloc.func1()
得,终究还是内存爆了,fatal error: runtime: out of memory
说明系统内存已不足,如果不把进程杀掉自保,就会导致整个系统的崩溃。
没有更好的办法,花钱扩内存吧。
软件测试工程师一只,也在不断的学习阶段,平时的小经验不定期分享。
博主经验有限,若有不足,欢迎交流,共同改进~
有意可加Q群 908417285 交流学习。
乾坤未定,你我皆是黑马
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。