It seems my server killed a process due to it using too much RAM. Is this possible? If it can happen, how can I know when and what process it killed?
Asked
Active
Viewed 1.8k times
5
-
http://stackoverflow.com/a/726879/280393 – David Portabella Oct 25 '16 at 13:40
1 Answers
12
It's quite possibly OOM killer, killed your process. You may be able to find out what when etc by looking in the logs.
egrep -i 'killed process' /var/log/messages
The actual log file varies by distribution so it could also be /var/log/syslog
or even
egrep -i -r 'killed process' /var/log
![](../../users/profiles/9517.webp)
user9517
- 114,104
- 20
- 206
- 289
-
Not only OOM killer can kill your process. Have a look at both dmesg and /var/log/messages. Also look at your application log to see if something went wrong before it was killed. Avoid using grep to parse log files, you could miss a line like this one : Jun 10 04:02:07 servername kernel: programname[3324]: segfault at 000000000000001a rip 00002af7f092dcd4 rsp 00007fff010ddf68 error 4 – Jun 03 '13 at 11:17
-
also, just because the oom killer kills a process, that does not mean that the process killed is the one causing trouble,. – Petter H Jun 03 '13 at 11:56
-
@befreeandgood:grep is the perfect tool for the job when, like I was, you are looking for a articular piece of text. Why don't you provide your own answer then there's plenty of room in the database for them. – user9517 Jun 03 '13 at 11:59