MySQL Forums
Forum List  »  Router & Proxy

mysql-proxy CPU usage spikes to 100% for no particular reason
Posted by: Rafal Pasek
Date: July 04, 2011 07:34AM

Hello,

I am having a problem with mysql-proxy (0.8.0) sometimes spiking up to 100% CPU usage for a few minutes and then getting back to normal.

My config is RHEL5.3 x64 with Apache and mysql-proxy setup to use two MySQL DB backends configured. The backends are configured to do Master-Master replication for the reason of automatic failover in case one of the DBs is down. The lua script in use is just as follows:
------------------------------------------
function connect_server()
proxy.connection.backend_ndx = 1
end

function read_query(packet)
proxy.connection.backend_ndx = 1
end
------------------------------------------

The Apache gets >100req/sec with digest authentication in use (this is where DB connection is used). Usually there are no problems but sometimes (less than once/24h) we observe that CPU usage of mysql-proxy rises to 99.9% for a time usually about 5 minutes. Afterwards it drops down to the usual 0.1% and everything is back to normal. At the same time there is no increase in Apache's CPU usage.

Is there someone else experiencing a similar behavior?
Is there any other easy way to get a failover behavior for MySQL DBs, but without mysql-proxy?

Options: ReplyQuote


Subject
Views
Written By
Posted
mysql-proxy CPU usage spikes to 100% for no particular reason
4278
July 04, 2011 07:34AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.