

The Linux kernel will terminate processes if their memory consumption exceeds the device’s RAM capacity limit. It indicates that the Tomcat server, which is a Java process, was terminated. Out of memory: Kill process 24339 (java) score 874 or sacrifice child Please see the highlighted error message in the kernel log:

3: 圜rash’s Kernel log analysis reporting ‘Out of memory: kill process or sacrifice child’

The analysis report of the kernel log generated by the 圜rash is below.įig. 圜rash pulls out critical errors and warnings from the log file & presents them. In this log file, all the events that happened in the Linux kernel can be found. One of the artifacts that 圜rash script captures is the kernel log file. We uploaded the captured artifacts into the 圜rash server for analysis. The 圜rash script captures 16 different artifacts from the technology stack, which includes: the Garbage Collection log, thread dump, heap dump, ps, top, top -H, vmstat, netstat, and more. In order to identify the source of the problem, we executed the open source 圜rash script on the EC2 instance in which Tomcat server was running. Out of memory: Kill process or sacrifice child Thus, this clue helped us to narrow down that Tomcat server is the source of the problem. If you notice the highlighted part of the screen, you will see this HTTP 502 bad gateway error is to be thrown by the Nginx server.Īs per the HTTP 502 error definition, Nginx should be throwing this error only if it would have got invalid response from the Tomcat server. There is a clue in this screenshot to indicate who is throwing this HTTP 502 error.

2: Screenshot of the HTTP 502 Bad gateway error thrown by Nginx serverĪbove is the screenshot of the HTTP 502 bad gateway error that we were receiving. In these 3 components, which one is throwing HTTP 502 bad gateway error?įig. Now the question is: there are three primary components in the EBS stack:
