-
Notifications
You must be signed in to change notification settings - Fork 977
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v2.0.6 and up: Way more than max_connections connections #2619
Comments
Can you please share the output from What you described it shouldn't happen, and if it happened that indeed seems like a bug. Thanks |
Uhm I made a stupid mistake, I reverted to the older version, which means I also lost all stats. Apologies for this, I will try to reproduce this within the next few days and hopefully share more data. |
With some effort I can reproduce this on a development instance. This is with
On this I've twice run 100 parallel requests, where each requests runs 4 queries over the same connection. When I ask ProxySQL everything seems fine:
The global stats don't show anything interesting to me, except that the monitor user fails because I have not configured that on my dev instance. It was working fine on the production instance when I had this same problem, so I strongly believe we can ignore those.
However, on the
and also
(there were a few other connections, the number dropped to 25 after my test) This mysql server is being used by other processes, so I left I'm convinced that if I lower |
Is there anything else "special" in your custom software, other than the fact that uses transactions? Thanks |
Not that I am aware of, but so far I haven't been able to reproduce it with simpler queries, so there must be something in there which triggers this. As a reference, I am using this for the MySQL connection. I will try to narrow this down to a reproducable example where I can share the full code. |
I've bisected that this bug was introduced with version 2.0.6, I've updated the title. Here is some code to reproduce it. It's in Haskell, it can be build with the Stack build tool, put the files in a directory and run This code makes 10 connections and for each connection does 10 What I have not been able to do is reproduce this with other MySQL clients. With tcpdump I can see that the only difference between the clients seems to be in capabilities in the login. After this packet all query packets seem identical, so I am pretty sure it must be in something that's set upon connection. Here is a dump from Wireshark for such login packet:
|
Thank you, very informative. A personal note, in 2.0.6 we added tracking of capabilities flags CLIENT_FOUND_ROWS , CLIENT_MULTI_RESULTS and CLIENT_MULTI_STATEMENTS. |
@renecannao ping, any luck looking into this? |
Hi @jbransen , this issue has been identified and should be fixed for v2.0.16, issue was regarding |
Great, thanks for the heads up! I've also opened an upstream MR |
Closes #2619: ProxySQL is creating more than 'max_connections' connections
Closes #2619: ProxySQL is creating more than 'max_connections' connections
I upgraded from v2.0.4 to v2.0.10, but when switching over the ProxySQL log was flooded with:
I'm running ProxySQL v2.0.10 on Ubuntu 18.04 connecting to MariaDB 10.3.14.
After increasing several limits, timeouts, etc., I found out the following. On the ProxySQL side, in the (
runtime_
)mysql_servers
table,max_connections
is set to200
. On the mysql sidemax_connections
is2000
. I had a few other processes connected directly to MySQL, and ProxySQL was using all of the remaining2000
connections. Then I increasedmax_connections
on the mysql side and within seconds ProxySQL was using 3000 more to saturate this. My upstream client uses a pool of size100
,mysql-max_connections
is set to2048
, and with ProxySQL v2.0.4 there are only58
open connections at this time, under the same load where ProxySQL v2.0.10 was using thousands.Somehow there is a large difference in the two versions, and since this only happens in a production environment I am not so keen on debugging much further, but I am happy to provide more relevant info. To me this very much looks like a bug, but maybe there is some config setting or change that I overlooked that could cause this?
The text was updated successfully, but these errors were encountered: