Freelancers Network
 
skill list top cap
Homepage
Join the Freelancer's Network
Update your details
Find a freelancer
Post a project
Find a project
Projects Archive
Post a job
Find a job
Jobs Archive
See Dan's Pages
See Andy's Pages
Link to this site
Resources
Join/Leave Forum
Forum Messages
+Additions+ Adverts
Advertising
Contact Us
Subscribe to our newsletter - enter your email address and hit return
Freelancers.net is owned and operated by Andy Stowell and Dan Winchester
skill list end cap
guru web hostcom

Find me again on Freelancers.net

Re: FN-FORUM: Help! Apache server being hammered and site keeps falling over!

date posted 1st November 2007 12:09

Anthony Cartmell wrote:
>
>> This takes time and money, though; this is more about quick speed
>> fixes, something which the config posted previously seems to have
>> helped with.
>
> My guess is a slow MySQL query: when I get these during development
> (such as with huge tables and forgetting an important join condition, so
> the results go silly) it effectively hangs the MySQL and apache
> processes, leading to excessive CPU and load. Re-starting MySQL kills
> the run-away query, and all returns to normal.

Just a quick caveat. If you restart mysql on debian, there is a default
setting which tells debian to check mysql. This can cause severe
problems on large or busy tables, as the process read/write locks the table.

We run 36 busy sites with replicated mysql databases and this caused
massive downtime for about half a day until we killed all the
debian-sys-maint queries.

look at /etc/mysql/debian-start.

Tom.
>
>> I'm guessing there's a fairly major memory leak somewhere in the
>> software, but I'm not sure where it is.
>
> You have plenty of spare memory and no swapping, so it's not a memory
> problem. It's a CPU usage problem: something is doing rather too much
> calculation work. That could be an inefficient PHP script or an
> inefficient MySQL query.
>
> mod_status will tell you which web pages are taking the CPU, which
> should help you narrow down the problem.
>
> And you do have indexes on all your foreign keys in MySQL, don't you?
> Miss one on a large table and your query can quickly go from taking a
> few milliseconds to dozens of seconds.
>
> Anthony



Messages by Day
November 30th 2007
November 29th 2007
November 28th 2007
November 27th 2007
November 26th 2007
November 25th 2007
November 24th 2007
November 23rd 2007
November 22nd 2007
November 21st 2007
November 20th 2007
November 19th 2007
November 18th 2007
November 17th 2007
November 16th 2007
November 15th 2007
November 14th 2007
November 13th 2007
November 12th 2007
November 11th 2007
November 10th 2007
November 9th 2007
November 8th 2007
November 7th 2007
November 6th 2007
November 5th 2007
November 4th 2007
November 3rd 2007
November 2nd 2007
November 1st 2007


Messages by Month
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007


Messages by Year
2008
2007
2006
2005
2004
2003
2002
2001
2000