Recently, my web server has been down sporadically for no apparent reason. It all started about a few months ago when my site suddenly went down. At that time I thought it was just an isolated problem so did not spend much time trying to figure out exactly what caused the server to shut down automatically.
But after a couple of weeks, it happened again. I thought at first that it was a software compatibility issue, but I had not installed any new software (except for the security updates) for the past few months. Or, maybe the server was over loaded? I did not find any clear answer.
I have tried to vary the number of the programs that are running on the server and even turned off the FTP service but the problem still seems to happen once a while.
Finally, the UPS that the server is connected to caught my attention. Because my server is the only machine that is connected to the UPS and the UPS communicates with the server via a USB cable. So I wondered whether the UPS malfunctioned somehow and instructed the server to shutdown. After combing through the server event log, I finally found several of the “Low Battery” messages emitted from the UPS service. Everything is pretty clear now: my computer is set to go to sleep when the battery reached the critical level in the UPS and that’s why my computer seemed to have powered off.
The power never went off during those times though; Windows somehow received a low battery message and was instructed to shutdown.
When I did a search on the internet afterwards, I was surprised to find out that many people had experienced the same problem as I did and suggested that it might be a glitch in the Windows UPS service. So my temporary solution is to set the battery low action to “never” instead of power off. Ironically enough, UPS is supposed to protect servers from power outages, but for my case at least, it actually caused more.