There can be several reasons for this:
Okay, this one is a bit more obvious: but do you have your computer on a power saving mode? You can check this by going to to the following directory:
cd /etc/pm
Check if there are any scheduled sleep or hibernate configs stored here. If there are modify them to reboot instead of sleep or simply remove them if safe to do so.
Your Power Supply unit could be an issue. It must have been damaged by a power surge. Was the computer connected to a surge protector or a UPS when the problem started? If not it might good to have one, especially since this is a server. If your PSU has been damaged, then it might be sending a fault signal to the OS to hibernate or sleep.
You can check your system logs to know what the problem is:
cat /var/log/syslog | grep "shutdown"
cat /var/log/syslog | grep "reboot"
cat /var/log/syslog | grep "sleep"
cat /var/log/syslog | grep "hibernate"
Since you are using Debian, as David suggested check out the pm-*
logs in /etc/log/pm-*
.
There are multiple of those, e.g. suspend, powersave, etc.
Hopefully between all of this, you should find out why the computer is becoming non-responsive.
/var/log
! Apparently Debian uses pm-utils, so your first look would be intopm-suspend.log
. From thereon you can look for (temporally) related events insyslog
. Post the relevant sections here, if you don't know what to do with them!