I have spent a whole day or two only in trying to make memcached start-up automatically on system restart in Windows 2008 Server system. I was getting this error “memcached.exe exits with Failed to ignore SIGHUP” when I tried to use the -d switch. In the end, it turned out to be pretty simple but trying to do it with Windows NT Resource Kit, PowerShell’s New-Service command, srvany.exe or the likes did NOT work at all for me. What worked for me was this:
- You go to Run > “RegEdit” hit enter.
- Then you find the key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
- Add a string value to it, name it whatever you want and put the full path to the memcached.exe file into the value of it.
Now you should be able to see the memcached startup when you reboot the system.
PS: In case you have a dependent service on memcached, change its start-up type to Automatic(delayed)