You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I'd like to report an issue with the max connection mismatch bewtween ProxySQL and MariaDB when executing write queries.
The write DB server uses MariadDB(10.11.6). It is Galera-clustered with 1 write/4 read split configuration. The max_connections shows 5000. Hostgroup 0 deals with write quries.
The OS and ProxySQL versions are as below.
ProxySQL version: ProxySQL version 2.3.2-10-g8cd66cf, codename Truls
OS version: Rocky linux 8.8
We have 4 (non-ProxySQL-clustered) WAS servers. There are 8 processes that connect to a DB server running on each server and each process manages a mysql2 connection pool with 300 connect limit.
mysql-max_connections | 2048 from "select * from global_variables;"
MaxConnUsed | 909 from "select * from stats_mysql_connection_pool;"
max_connections | 1000 from from "select * from mysql_servers;"
I personally expected that with 1000 max_connections and 4 WAS servers, the maximum connection for the write DB server(hostgroup: 0) won't exceed 4000. However, I could monitor more than 4000 thread_connected out of of 5000 max connections on the write DB server. The query was like
INSERT INTO TABLE1 (A,B,C)
SELECT A,B,C FROM TABLE2
LIMIT 0,500;
INSERT INTO TABLE1 (A,B,C)
SELECT A,B,C FROM TABLE2
LIMIT 500,500;
INSERT INTO TABLE1 (A,B,C)
SELECT A,B,C FROM TABLE2
LIMIT 1000,500;
...
INSERT INTO TABLE1 (A,B,C)
SELECT A,B,C FROM TABLE2
LIMIT 30000,500;
The first guess I could make was that 2048 mysql-max_connections variable overode 1000 max_connections configuration and now it allows each WAS server has up to 2048 connection.
Second one is that each of 4 WAS has around 900 MaxConnUsed for hostgroup 0 that is summed up to ~3600. (which makes me think the 1000 max_connection configuration worked properly) However, the looping query(LIMIT X,500) forces creating connections, so it was not able to reuse a connection somehow even though multiplex option was true. The connection seemed to exceed 4000 "only temporarily" before the garbage connection was broken.
I always appreciate your support.
Sincerely
Luke
The text was updated successfully, but these errors were encountered:
Hello, I'd like to report an issue with the max connection mismatch bewtween ProxySQL and MariaDB when executing write queries.
The write DB server uses MariadDB(10.11.6). It is Galera-clustered with 1 write/4 read split configuration. The
max_connections
shows 5000. Hostgroup 0 deals with write quries.The OS and ProxySQL versions are as below.
We have 4 (non-ProxySQL-clustered) WAS servers. There are 8 processes that connect to a DB server running on each server and each process manages a mysql2 connection pool with 300 connect limit.
The ProxySQL variables and status.
I personally expected that with 1000 max_connections and 4 WAS servers, the maximum connection for the write DB server(hostgroup: 0) won't exceed 4000. However, I could monitor more than 4000 thread_connected out of of 5000 max connections on the write DB server. The query was like
I always appreciate your support.
Sincerely
Luke
The text was updated successfully, but these errors were encountered: