Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Sun Jul 05, 2015 3:35 pm 
Offline
Senior Newbie

Joined: Mon Aug 04, 2014 9:06 pm
Posts: 12
I'm new to this whole sysadmin thing and really struggle with the basics. I can't seem to keep the database running on a single instance of wordpress. I've tried reviewing logs and such but can't seem to figure out anything going wrong. At this point, I don't care to figure it out. I just want the service to reboot automatically if it goes down. How do the big hosting companies handle this (e.g., dreamhost)? Do they have scripts that run and check status on mysql frequently? If so, any examples? Do any other tools exists that could help manage some of the sysadmin "burden"?

Thanks!


Top
   
PostPosted: Mon Jul 06, 2015 7:11 am 
Offline
Senior Member

Joined: Fri Feb 13, 2015 8:12 pm
Posts: 101
austins wrote:
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.


Top
   
PostPosted: Mon Jul 06, 2015 8:13 am 
Offline
Newbie

Joined: Mon Jul 06, 2015 5:57 am
Posts: 3
austins wrote:
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.


Top
   
PostPosted: Wed Jul 08, 2015 3:29 pm 
Offline
Junior Member
User avatar

Joined: Mon Jun 22, 2015 12:55 am
Posts: 30
Website: http://iserversupport.com/
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

_________________
Server Management with 24x7 monitoring
http://iserversupport.com/on-demand/


Top
   
PostPosted: Wed Jul 08, 2015 5:26 pm 
Offline
Senior Member

Joined: Sun Aug 31, 2008 4:29 pm
Posts: 177
iserversupport wrote:
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.

_________________
sleddog


Top
   
PostPosted: Thu Jul 16, 2015 9:52 pm 
Offline
Senior Newbie

Joined: Mon Aug 04, 2014 9:06 pm
Posts: 12
I think I was just in a bad mood when I posted. I actually do enjoy the learning aspects, but it is tiring when I'm not a diehard linux guy and can't figure something out. I'm taking everything you all said into consideration. It does appear that mysql is dieing because of a memory error:

mysqld invoked oom-killer: gfp_mask=0x280da, order=0, oom_score_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...


Top
   
PostPosted: Fri Jul 17, 2015 3:57 am 
Offline
Senior Member
User avatar

Joined: Sun Jan 18, 2009 2:41 pm
Posts: 830
austins wrote:
mysqld invoked oom-killer: gfp_mask=0x280da, order=0, oom_score_adj=0


Sounds like sanvila's crystal ball is working well.
sanvila wrote:
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. Should you still have out-of-memory problems after following that, reduce MaxClients even lower. As suggested earlier, you could also switch to nginx or use Apache with php-fpm, but these are more involved options that aren't really necessary for a low-traffic blog.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
RSS

Powered by phpBB® Forum Software © phpBB Group