MySQL Server hitting 100% unexpectedly (Amazon AWS RDS)
        Posted  
        
            by 
                Luc
            
        on Server Fault
        
        See other posts from Server Fault
        
            or by Luc
        
        
        
        Published on 2012-09-17T07:15:18Z
        Indexed on 
            2012/09/17
            9:40 UTC
        
        
        Read the original article
        Hit count: 402
        

Please help! We've been struggling with this one for months. This week we upped our RDS instance to the highest performing instance and although the occurrences have reduced, we're still having our DB all of a sudden hit 100%. It comes out of nowhere. Sometimes 2am, sometimes midday.
I've ruled out a DOS - our pages access logs have normal traffic
I've ruled out memcached suddenly dieing (hits and misses continue as normal).
The SHOW PROCESSLIST while we have issues reports about 500 queries in queue. If I kill them off or restart the server, they just keep coming back and then eventually out of knowhere, our server resumes back to normal. Sometimes up to 3 hours.
Our bad performing queries take .02 seconds to execute when the server eventually returns back to normal but while we're in this 100% CPU physco phase, those queries never finish executing.
Please help!!!!! Anybody know anything about MYSQL query optimization? Could it be the server deciding to use different indexes all of a sudden, which puts it into a spiral?
© Server Fault or respective owner