线上数据库查看允许的max_connections和当前使用的连接

DBA实时拉取的线上的链接使用可以看到,数据库空余很多连接,压力很小,这部分资源可以充分的榨取出来

2 线上数据库支持的最大连接数配置

busi_plat库

mysql> show global variables like '%max_con%';

+---------------------------------------+-------+

| Variable_name                         | Value |

+---------------------------------------+-------+

| max_connect_errors                    | 10    |

| max_connections                       | 5000  |

| performance_schema_max_cond_classes   | 80    |

扫描二维码关注公众号,回复: 305389 查看本文章

| performance_schema_max_cond_instances | 1000  |

+---------------------------------------+-------+

4 rows in set (0.00 sec)

mysql> show processlist;

+---------+---------------+---------------------+-----------+-------------+----------+-----------------------------------------------------------------------+---------------------------------------------------------------+--

| Id      | User          | Host                | db        | Command     | Time     | State                                                                 | Info                                                          |

+---------+---------------+---------------------+-----------+-------------+----------+-----------------------------------------------------------------------+---------------------------------------------------------------+

|  741365 | replication   | 172.16.8.105:46001  | NULL      | Binlog Dump | 24882924 | Master has sent all binlog to slave; waiting for binlog to be updated | NULL                                                          |

| 7854050 | replication   | 172.16.10.176:33272 | NULL      | Binlog Dump |  2256605 | Master has sent all binlog to slave; waiting for binlog to be updated | NULL                                                          |

46 rows in set (0.00 sec)

-----------------------------------

猜你喜欢

转载自curious.iteye.com/blog/2308115
今日推荐