paulwong

RHEL\CentOS 7 下 MySQL 连接数被限制为214个

MARIADB的默认最大连接数是100,当试图更改配置文件/etc/my.conf追加max_connections=1000,并重启服务时,发现最大连接数被重置为214,这是由于系统问题,open_files数为1024,如何正确地更改是个复杂的问题。

MARIADB中一些查当前连接数/最大连接数的命令为:

MariaDB [(none)]
show variables like "max_connections";
show processlist;
show status where variable_name = 'threads_connected';
show status where variable_name = 'max_used_connections';
show variables like 'max_user_connections';
show variables like '%connection%';

正确方案:
RHEL\CentOS 7 下 MySQL 连接数被限制为214个
https://waylau.com/rhel-mysql-connections-limit-214/

Centos7.4下面mysql的max_connections不生效的问题。
https://blog.51cto.com/wangqh/2131340

为何要在SERVICE中添加允许打开的文件数?
Centos7下修改/etc/security/limits.conf文件只在用户登录后打开的进程有效,系统服务或通过rc.local启动的无效,系统服务修改文件/usr/lib/systemd/system/SOME_SERVICE.service添加:
[Service]
LimitNOFILE=65535


关于LINUX系统的最大打开文件数:
https://blog.51cto.com/as007012/1956222

https://www.haiyun.me/archives/linux-file-limit.html

posted on 2020-08-05 20:55 paulwong 阅读(371) 评论(0)  编辑  收藏 所属分类: MYSQL


只有注册用户登录后才能发表评论。


网站导航: