MySQL Forums
Forum List  »  Performance

Re: too many connections issue
Posted by: James Day
Date: January 11, 2005 10:21AM

I think the maximum in the compiled versions MySQL AB supplies is 4,000 but it can be higher if you compile it yourself. For a top 150 web site with non-persistent connections, only problems have resulted in me seeing more than 1,000 connections and the server is set to allow 2,000. The application doesn't use persistent connections.

If you're seeing the error, increase the number of connections allowed and/or decrease the timeout. If you do find the timeout being necessary, look to see why the connections are staying open because it may be a bug in your application if you aren't a company running the server for web hosting. If you find that you can't handle the number of connections you get, use the slow query log or mytop with the i switch to show long running connections first and then try to optimise those queries. If your server becomes very sensitive and starts to accumulate many connections very quickly when a slow query happens, it's probably overloaded - handling too many queries which are taking too long. Optimising the queries or adding database slaves and modifying the application to support them are common ways to handle that.

Options: ReplyQuote


Subject
Views
Written By
Posted
2775
January 08, 2005 01:57AM
2148
January 10, 2005 12:44AM
Re: too many connections issue
2230
January 11, 2005 10:21AM
1944
January 11, 2005 12:53PM


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.