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 閱讀(392) 評論(0)  編輯  收藏 所屬分類: MYSQL

          主站蜘蛛池模板: 栾川县| 昌乐县| 乌拉特后旗| 汉源县| 勐海县| 鄂托克旗| 吕梁市| 涟水县| 曲松县| 合作市| 陆丰市| 达孜县| 定边县| 大姚县| 花莲县| 张家川| 巨鹿县| 左权县| 临夏县| 镇原县| 昭平县| 寿光市| 延寿县| 巴里| 龙州县| 正阳县| 东辽县| 凌海市| 麻江县| 磐石市| 石屏县| 潜山县| 平昌县| 宁河县| 烟台市| 勐海县| 新巴尔虎左旗| 禄丰县| 海原县| 屯留县| 枞阳县|