Ho avuto lo stesso problema. Dopo alcune ricerche ho intuito che fosse os a sacrificare mongod
per memoria. Se il kernel ha ucciso il tuo mongod puoi trovare i log nei log del kernel
La maggior parte dei log del kernel saranno in /var/log/kern.log
, I registri potrebbero essere ruotati.
Quindi meglio fare un grep
grep mongod /var/log/kern.log*
se i log sono archiviatifind -name \*kern.log.*.gz -print0 | xargs -0 zgrep "mongod"
./kern.log.1:Nov 12 12:55:04 ip-xxx-xxx-xxx-xxx kernel: [8413229.118361] mongod invoked oom-killer: gfp_mask=0x24201ca, order=0, oom_score_adj=0
./kern.log.1:Nov 12 12:55:04 ip-xxx-xxx-xxx-xxx kernel: [8413229.118365] mongod cpuset=/ mems_allowed=0
./kern.log.1:Nov 12 12:55:04 ip-xxx-xxx-xxx-xxx kernel: [8413229.118371] CPU: 0 PID: 1830 Comm: mongod Not tainted 4.4.0-1062-aws #71-Ubuntu
./kern.log.1:Nov 12 12:55:04 ip-xxx-xxx-xxx-xxx kernel: [8413229.118531] [ 1301] 112 1301 300787 181207 485 4 0 0 mongod
./kern.log.1:Nov 12 12:55:04 ip-xxx-xxx-xxx-xxx kernel: [8413229.118680] Out of memory: Kill process 1301 (mongod) score 355 or sacrifice child
./kern.log.1:Nov 12 12:55:04 ip-xxx-xxx-xxx-xxx kernel: [8413229.130161] Killed process 1301 (mongod) total-vm:1203148kB, anon-rss:724828kB, file-rss:0kB