If you are experiencing memcache process went down unexpectedly. You can create a script like this
#!/bin/bash if ps -u memcached |grep -E 'memcached$' > /dev/null then echo "memcached is running." else echo "starging memcache." /etc/init.d/memcached restart fi
ps -u memcached, here you can change memcached to the user account which is used for starting memcache depends on your operating system settings. For example, ps -u root if you are on root.
Name the script xxxx.sh, change the permission make it available for execution. Then create a job in crontab to run the script periodically.
*/5 * * * * /scripts/memcached_check.sh &> /dev/null