This morning instead of my site I had this error. So, I searched the web and found out that restarting the DB should solve the issue. So I logged in as a root user, restarted the DB and sure enough everything was back to normal. Question, what causes this error and how can I prevent it next time around?
First off, that's definitely not supposed to happen. Second, since you're not providing any info about your setup, or what you're running (versions), it's hard to say what might have failed. Since a restart of the DB worked, it suggests that the problem lies with the DB or at least the server the DB runs on, but again, since you're providing no information, it's next to impossible to guess what was wrong. I would suggest looking at the server logs to find out exactly what went wrong, and then procede from there.
There was an alert I saw earlier (which now disappeared). It was something about "reaching 95% of memory usage". Which is total bull, because there's no chance in the world that I could've reached it. Unless there was some kind of bot attack. When I look at the Resources: CPU Usage is at 7.3% Memory Usage is at 32% Disc Space Usage is at 17% So it makes no sense why I got that alert this morning or why the DB needed restarting. Are there one or two common reasons that can shut down a DB?
Could be a process that has hung - ie something that pulls or queries the DB constantly. Are you on a shared hosting? If so, (and if they're not configuring things properly), you'll have a max amount of CPU and memory available for ALL instances running on that server - if one of the OTHER instances all of a sudden starts draining resources, that might mean that your resourcepool gets smaller, and hence, your app crash. Not due to a fault of your own, but due to a fail in the resourcehandling on the server. If the logs / alert tells you that memory usage is at 95%, then it probably is - and it might be because of some logic in your app that doesn't run as you intended it to.
I have an issue on my box where the web access logs are going crazy due to genuine traffic and google indexing, they clean up at night when my webalizer tool runs, but sometimes its over 10gb a day and space gets very low...