Sysadmining made easier? MySQL constantly crashing, etc
Thanks!
6 Replies
@austins:
I don't care to figure it out.
[…]
How do the big hosting companies handle this (e.g., dreamhost)?
[…]
The big hosting companies do care about figuring it out.
Your mysql daemon is probably a victim of the Out Of Memory killer. I guess you have Apache in prefork mode and more visits than your available RAM + swap can handle.
Consider switching to Nginx + PHP-FPM.
p.s. If you want to be a good sysadmin, you should really abandon the idea (common among users of Windows) that rebooting is the way to solve your problems.
@austins:
How do the big hosting companies handle this (e.g., dreamhost)? […]
Most major companies don't look to reboots to fix most issues, they look at fixing the issue that is causing it to die or reboot in the first place.
But in direct answer to your questions, most large web-hosting companies have teams that monitor all their Servers health via Nagios, or in-house monitoring software. When a service dies, it alerts them and they can look into the root cause.
Try this command you can see if mysql got killed because of memory shortage
cat /var/log/messages | grep mysql | grep oom
@iserversupport:
You need proper monitoring to make sure server is up and running
Try this command you can see if mysql got killed because of memory shortage
cat /var/log/messages | grep mysql | grep oom
1. /var/log/messages is the syslog for RedHat/CentOS distributions. Other distros will differ.
2. cat /var/log/messages | grep mysql is an unnecessary use of 'cat'.
If you're really a Linux server administrator you should know these things.
austins: if you really don't care to figure it out (as you said), then we can't help. You should be using a managed web hosting service.
mysqld invoked oom-killer: gfpmask=0x280da, order=0, oomscore_adj=0
I guess time to do some research. I only have a single wordpress site that I'd like to keep running on the regular. It is getting about 500 hits a day…
@austins:
mysqld invoked oom-killer: gfpmask=0x280da, order=0, oomscore_adj=0
Sounds like sanvila's crystal ball is working well.
@sanvila:
Your mysql daemon is probably a victim of the Out Of Memory killer. I guess you have Apache in prefork mode and more visits than your available RAM + swap can handle.
Are you running Apache? If so, check out the Linode memory troubleshooting guide