paulwong

          RHEL\CentOS 7 下 MySQL 連接數(shù)被限制為214個

          MARIADB的默認最大連接數(shù)是100,當(dāng)試圖更改配置文件/etc/my.conf追加max_connections=1000,并重啟服務(wù)時,發(fā)現(xiàn)最大連接數(shù)被重置為214,這是由于系統(tǒng)問題,open_files數(shù)為1024,如何正確地更改是個復(fù)雜的問題。

          MARIADB中一些查當(dāng)前連接數(shù)/最大連接數(shù)的命令為:

          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 連接數(shù)被限制為214個
          https://waylau.com/rhel-mysql-connections-limit-214/

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

          為何要在SERVICE中添加允許打開的文件數(shù)?
          Centos7下修改/etc/security/limits.conf文件只在用戶登錄后打開的進程有效,系統(tǒng)服務(wù)或通過rc.local啟動的無效,系統(tǒng)服務(wù)修改文件/usr/lib/systemd/system/SOME_SERVICE.service添加:
          [Service]
          LimitNOFILE=65535


          關(guān)于LINUX系統(tǒng)的最大打開文件數(shù):
          https://blog.51cto.com/as007012/1956222

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

          posted on 2020-08-05 20:55 paulwong 閱讀(389) 評論(0)  編輯  收藏 所屬分類: MYSQL

          主站蜘蛛池模板: 淮滨县| 高台县| 南宁市| 洪雅县| 丁青县| 临清市| 秦皇岛市| 叙永县| 石家庄市| 九龙坡区| 乡城县| 皮山县| 咸阳市| 临泽县| 中超| 宁津县| 自治县| 廉江市| 南溪县| 石城县| 东乡| 布尔津县| 邵阳市| 依安县| 蒲城县| 丹江口市| 磴口县| 盐池县| 长岭县| 黔江区| 花莲县| 奉化市| 台山市| 巴塘县| 芜湖县| 扶沟县| 涪陵区| 桐梓县| 海南省| 沅陵县| 佛山市|