I had a similar problem with the GUI no longer responding. After reading through various threads, the common consensus is the OOM_killer is killing them off when it needs some additional memory. I call this script as part of my boot sequence. It sets the "emhttp" and samba shares to not be killed off. I have not had any issues after I started using this script. As this gets logged in my syslog when it runs, I do a before and after check. It might help you and it might not depending on the source of your issues.
The bottom block of code is all you really need. The other comments/info are notes to myself.
#!/bin/bash
# Wait 120 seconds to ensure SAMBA has started.
# sleep 120
#############################################
# This adjusts the PID for UNRAID server and Shares process may never be killed in a low memory condition.
#############################################
# From http://lime-technology.com/forum/index.php?topic=20013.msg200115;topicseen#msg20011
#
#
# From https://access.redhat.com/knowledge/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Deployment_Guide/s2-proc-pid.html
# and
# From http://www.kernel.org/doc/man-pages/online/pages/man5/proc.5.html
# #
# There is also a special value of -17, which disables oom_killer for a process.
# An oom_score of a value of 0, indicates that this process would not be killed.
#
# Use the following command to view the score. It should be "0" after running the commands below
# cat /proc/[pid]/oom_score
#
# To see the path for where the program lives.
# /usr/sbin/smbd
#
# To view current PID use:
# pgrep -f "/usr/local/sbin/emhttp"
# pgrep -f "/usr/sbin/smbd"
#
# Combined command to find the PID and show the score.
# pgrep -f "/usr/local/sbin/emhttp" | while read PID; do cat /proc/$PID/oom_score; done
# pgrep -f "/usr/sbin/smbd" | while read PID; do cat /proc/$PID/oom_score; done
#
#############################################
# Set UNRAID webserver is never killed off.
# pgrep -f "/usr/local/sbin/emhttp" | while read PID; do echo -17 > /proc/$PID/oom_adj; done
#
# Set SAMBA so shares are never killed off.
# pgrep -f "/usr/sbin/smbd" | while read PID; do echo -17 > /proc/$PID/oom_adj; done
#############################################
#
#
# Uses the new oom_score_adj
#############################################
# Check the OOM values before the change
pgrep -f "/usr/local/sbin/emhttp" | while read PID; do cat /proc/$PID/oom_score; done
pgrep -f "/usr/sbin/smbd" | while read PID; do cat /proc/$PID/oom_score; done
# Set UNRAID webserver is never killed off.
pgrep -f "/usr/local/sbin/emhttp" | while read PID; do echo -1000 > /proc/$PID/oom_score_adj; done
#
# Set SAMBA so shares are never killed off.
pgrep -f "/usr/sbin/smbd" | while read PID; do echo -1000 > /proc/$PID/oom_score_adj; done
#
# Check the OOM values after the change
pgrep -f "/usr/local/sbin/emhttp" | while read PID; do cat /proc/$PID/oom_score; done
pgrep -f "/usr/sbin/smbd" | while read PID; do cat /proc/$PID/oom_score; done
#############################################