I am running apache in Kubernetes pod and I am troubled by random OOM kills of the apache process and I am unsure of the cause.
The pod has 600M memory limit and it seems it can consume it quite easily even though PHP has 128 MB limit per run. When observing dmesg -w I can regularly see:
[4019392.626796] Memory cgroup out of memory: Kill process 4178127 (apache2) score 1137 or sacrifice child
[4019392.636520] Killed process 4178127 (apache2) total-vm:143960kB, anon-rss:22856kB, file-rss:10472kB, shmem-rss:28228kB
- How can I be sure, that this OOM kill is related to the machine or to the pod limits?
- There are several apache pods and I am not sure how to recognize the pod to which this process belonged. Is there a way?
- It would be great if these were accessible within the pods, so one could see killed threads which actually belonged to the pod (ideally in error output). Is it possible?