今天,我注意到独角兽没有在生产环境中运行。 Unicorn错误日志如下(由于SIGKILL信号似乎停止了独角兽):
D, [2017-10-11T12:25:49.521336 #9375] DEBUG -- : waiting 16.0s after suspend/hibernation
E, [2017-10-11T12:26:08.051349 #9375] ERROR -- : reaped #<Process::Status: pid 9535 SIGKILL (signal 9)> worker=1
I, [2017-10-11T12:26:21.708135 #9375] INFO -- : worker=1 spawning...
当独角兽被杀时,我们遇到了一个记忆力不足的问题。在/var/log/syslog.1中,我有以下日志:
Oct 11 12:26:02 analiz kernel: [4486147.309450] [<ffffffff81190979>] out_of_memory+0x219/0x460
Oct 11 12:26:02 analiz kernel: [4486147.309677] Out of memory: Kill process 9375 (ruby2.3) score 81 or sacrifice child
现在我的问题是;
Oct 11 12:26:02 analiz kernel: [4486147.309419] postgres invoked oom-killer: gfp_mask=0x24200ca, order=0, oom_score_adj=0 Oct 11 12:26:02 analiz kernel: [4486147.309422] postgres cpuset=/ mems_allowed=0 Oct 11 12:26:02 analiz kernel: [4486147.309427] CPU: 0 PID: 9570 Comm: postgres Not tainted 4.4.0-1031-aws #40-Ubuntu Oct 11 12:26:02 analiz kernel: [4486147.309428] Hardware name: Xen HVM domU, BIOS 4.2.amazon 02/16/2017 Oct 11 12:26:02 analiz kernel: [4486147.309429] 0000000000000286 08956ec91b465ba3 ffff88000918f9e8 ffffffff813f6ec3 Oct 11 12:26:02 analiz kernel: [4486147.309432] ffff88000918fba0 ffff88003cfdb700 ffff88000918fa58 ffffffff81208b3a Oct 11 12:26:02 analiz kernel: [4486147.309433] ffffffff81cc3661 0000000000000000 ffffffff81e667a0 0000000000000206
提前致谢。