Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
 Post subject: My linode keeps failing
PostPosted: Wed Jun 23, 2010 1:31 pm 
Offline
Junior Member
User avatar

Joined: Thu Sep 03, 2009 10:47 pm
Posts: 35
Website: http://www.kavoir.com/
I have no idea what the culprit is. Here's what the munin says:

http://www.nexbo.com/munin/

How can I know exactly which PHP scripts from all the websites I have on my linode that are costing the most server resources such as RAM? Can you please also point me to some reputable paid server optimization services? Thanks!

_________________
I have a passion for building websites. I love Usable Databases.


Top
   
 Post subject:
PostPosted: Wed Jun 23, 2010 2:23 pm 
Offline
Junior Member

Joined: Thu Jun 03, 2010 4:44 pm
Posts: 35
Post some more details about your server and issues specifically. There is a lot of great help around here.

If you'd rather pay, I'd be happy to take care of the problem for you. :D


Top
   
 Post subject:
PostPosted: Wed Jun 23, 2010 5:26 pm 
Offline
Senior Member
User avatar

Joined: Tue May 26, 2009 3:29 pm
Posts: 1691
Location: Montreal, QC
I'd make a wild guess and say, you got a surge in traffic, Apache went nuts trying to handle it, and your box OOMed and started killing processes... But that's just wild speculation without knowing anything more about the issue.


Top
   
 Post subject:
PostPosted: Wed Jun 23, 2010 5:41 pm 
Offline
Senior Member

Joined: Fri May 02, 2008 8:44 pm
Posts: 1121
The munin graphs don't look like the box OOMed, but if it happened very quickly it might not have been graphed. Please tell us more symptoms of "failing". Exactly what doesn't work? What do the CPU/network/IO graphs look like in your linode manager?

- If you're using MySQL heavily, find out which queries are taking a long time. Google "mysql slow query".

- Check the system logs for any mention of OOM (out of memory), segfault, "kill", etc.

- Keep Apache's ServerLimit and MaxClients below 25. Find the memory_limit line in your php.ini and make sure it's reasonable, such as 32M. Some distros have a default of 128M, which is too high for a linode 512. Restart Apache. If you notice that some script doesn't work anymore, it might be the culprit.


Top
   
 Post subject:
PostPosted: Wed Jun 23, 2010 9:45 pm 
Offline
Junior Member
User avatar

Joined: Thu Sep 03, 2009 10:47 pm
Posts: 35
Website: http://www.kavoir.com/
Thanks all for the help.

Hi, hybinet, may I know what logs should I look at in this case? Where are they located?

I have configured PHP as you have advised. I have also optimized Apache2 and MySQL the way described at here: http://library.linode.com/troubleshooti ... networking

Restarted my box and will let you know how it goes.

_________________
I have a passion for building websites. I love Usable Databases.


Top
   
 Post subject:
PostPosted: Sun Jul 11, 2010 2:59 pm 
Offline
Junior Member

Joined: Sat Jul 10, 2010 12:02 am
Posts: 20
..and how did it go?

I noticed this in that linode document:

In your MySQL configuration file (typically found in /etc/mysql/my.cnf), change your entries for the various settings shown below to match the recommended values:

key_buffer = 16K
max_allowed_packet = 1M
thread_stack = 64K
table_cache = 4
sort_buffer = 64K
net_buffer_length = 2K

now, key_buffer is default 16M , they suggest changing it to 16k ?

is that a typo?


Top
   
 Post subject:
PostPosted: Sun Jul 11, 2010 3:22 pm 
Offline
Senior Member
User avatar

Joined: Fri Oct 24, 2003 3:51 pm
Posts: 965
Location: Netherlands
It looks like a leftover from when the smallest Linode had 64M of memory -- it's the value suggested in the example file my-small.cnf. You can stick with 16M, the value from my-medium.cnf.

_________________
/ Peter


Top
   
 Post subject:
PostPosted: Sun Jul 11, 2010 3:26 pm 
Offline
Junior Member

Joined: Sat Jul 10, 2010 12:02 am
Posts: 20
pclissold wrote:
It looks like a leftover from when the smallest Linode had 64M of memory -- it's the value suggested in the example file my-small.cnf. You can stick with 16M, the value from my-medium.cnf.


OK, thanks! Do the other values look reasonable still?


Top
   
 Post subject:
PostPosted: Sun Jul 11, 2010 4:17 pm 
Offline
Senior Member
User avatar

Joined: Fri Oct 24, 2003 3:51 pm
Posts: 965
Location: Netherlands
Omit thread_stack (i.e. leave it at the default of 192k) unless you have a lot of recursive procedures -- in which case you'll get an error and need to increase it. I would go with the sort_buffer_size = 512K and net_buffer_length = 8K from my-medium.cnf. table_cache should be at least as big as max_connections (default is 100).

_________________
/ Peter


Top
   
 Post subject:
PostPosted: Sun Jul 11, 2010 4:19 pm 
Offline
Senior Member
User avatar

Joined: Fri Oct 24, 2003 3:51 pm
Posts: 965
Location: Netherlands
Just a thought -- from your other thread -- Apache needs its memory footprint reducing as well.

_________________
/ Peter


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:  
RSS

Powered by phpBB® Forum Software © phpBB Group