May be having several reasons to server might be crashs, but one of the common cause is running out of memory.
When ever the RAM and swap space are completely exhausted, kernel will start killing the processes and typically those using the most of the memory and the most short-lived. The error may occurs when ever server is using all of its memory, and a new or existing process attempts to access additional memory. If we look in to the log files for like “Out of Memory” or kernel warnings. These indicate your system intentionally killed the process or application rather than allowing the process to crash.
Jun 13 21:31:26 itmaddy kernel: [ 2115.818171] Out of memory: Kill process 16871 (memkiller) score 838 or sacrifice child
Jun 13 21:31:26 itmaddy kernel: [ 2115.818986] Killed process 16871 (memkiller) total-vm:188211281kB, anon-rss:562316kB, file-rss:2kB, shmem-rss:0kB
Jun 13 21:31:27 itmaddy kernel: [ 2115.518686] oom_reaper: reaped process 14871 (memkiller), now anon-rss:1kB, file-rss:2kB, shmem-rss:0kB
We can find logs the kernel log (/var/log/kern.log) or in the syslog (/var/log/syslog). we can use a tool like grep to search the relevant entries:
$grep “Out of memory” /var/log/syslog
Jun 13 21:31:26 itmaddy kernel: [ 2115.818171] Out of memory: Kill process 16871 (memkiller) score 838 or sacrifice child