If on a unix-like system like linux, you can run a cronjob that queries getinfo and if timed out, restarts the daemon i.e.:
#!/bin/bash
timeout 10 somecoin-cli getinfo
if [[ $? > 0 ]]; then
echo "somecoind is hanging - restarting somecoind"
kill -9 $(ps auxww|grep somecoind|grep -v grep|awk '{print $2}')
sleep 5
/usr/local/bin/somecoind >/dev/null 2>&1
fi
I am using a way more elaborate script that reads coinds to check from a text file.
HTH
So, nice idea.
I have same problem too and want to try this script.
I think this resolve this issue.
Thanks.