We have always received quite few questions here at Percona Support on how to avoid the dreaded “Too many connections” error, as well as what is the recommended value for max_connections. So, in this article I will try to cover best possible answers to these questions so others can mitigate similar kinds of issues. My […]
There are different articles on how to setup MySQL with SSL but it’s sometimes difficult to end up with a good simple one. Usually, setting up MySQL SSL is not really a smooth process due to such factors like “it’s not your day”, something is broken apparently or the documentation lies I am going to […]
The use of tmpfs/ramfs as /tmp partition is a common trick to improve the performance of on-disk temporary tables. Servers usually have less RAM than disk space so those kind of partitions are very limited in size and there are some cases were we can run out of space. Let’s see one example. We’re running […]
One thing I noticed during the observation was that there were roughly 2,000 new connections to MySQL per second during peak times. This is a high number by any account. When a new connection to MySQL is made, it can go into the back_log, which effectively serves as a queue for new connections on operating […]
Last Friday I published results of DBT2 performance while varying the number of idle connections here, but I had compiled MySQL with the debugging code enabled. That completely screw up my results, be aware… debug options have a huge performance impact. So, I recompiled Percona-Server 11.2 without the debug options and did another benchmark run. […]
Be careful with my findings, I appear to have compile in debug mode, I am redoing the benchmarks. Updated version here. I recently had to work with many customers having large number of connections opened in MySQL and although I told them this was not optimal, I had no solid arguments to present. More than […]
Did that ever happen to you in production?
[percona@sandbox msb_5_0_87]$ ./use
ERROR 1040 (00000): Too many connections
Just happened to one of our customers. Want to know what we did?
Every so often I run into situation when I need to kill a lot of connections on MySQL server – for example hundreds of instances of some bad query is running making server unusable. Many people have special scripts which can take the user, source host or query as a parameter and perform the action. […]
Have you ever seen connection in the SHOW PROCESSLIST output which is in “Sleep” state for a long time and you have no idea why this would happen ? I see if frequently with web applications and it is often indication of trouble. Not only it means you may run out of MySQL connections quicker […]
As you probably know PHP “mysql” extension supported persistent connections but they were disabled in new “mysqli” extension, which is probably one of the reasons some people delay migration to this extension. The reason behind using persistent connections is of course reducing number of connects which are rather expensive, even though they are much faster […]