Wednesday, September 3, 2014

MySQL: Too Many Connection Error

It has been very much used MySQL since introduced around the year 2005, and this leads to a real DBMS Engine which allows the direction of the Enterprise. More economical than the use of another engine such as MS SQL or Oracle. But there are to watch out for with the economic value, is the issue of too many connection, many servers that have a very high visitor is having trouble. And I feel it when going on a website that I have ever manage at FMIPA Universitas Jember
Too Many Connection occurs because of some problems like this: too many connections that occur simultaneously, often experienced by these sites that weve crowded. packet flooding defect occurs to the port that MySQL is used, this can be tested by doing a telnet to 3306 too many connections are already obsolete, but not in the release or in-free
For the first cause, which occurs because the force is due to conditions that occur simultaneous connections. To solve this problem is to tweak the mysql configuration file (my.ini or my.cnf) and increase the value of the max_connections variable. Default variable values ​​100 For websites that crowded, maybe less default settings. Or it could be another way to dispose of or give a # at the max_connections variable. 

For the second cause, there are many defects in the pool MySQL package, how to fix this is to do mysqladmin flush using the tools. make a batch-script that contents mysqladmin flush-hosts then attach a handler in the web server or on a desktop program (adjust with the environment) if you find an error in MySQL engines with error code SQLSTATE = 08S01 (for server-related error bad packet) or 46000 (to a server error relating to that connection) 

For the third cause, too many connections that are already obsolete, but not in the release or in the free, this is a coding issue. Code that is not good, it will leave a lot of junk in the cache server. For the coder, may know how to connect to the DBMS, whether by way of persistent-connection or non-persistent. What is gained if you have too many connection, he replied restart the server. But if we understand the 3 terms above may be a bit inevitable. I HOPE

No comments:

Post a Comment