当前位置:网站首页>【MySQL 15】Could not increase number of max_ open_ files to more than 10000 (request: 65535)
【MySQL 15】Could not increase number of max_ open_ files to more than 10000 (request: 65535)
2022-07-06 02:21:00 【Rusty well began】
1、 read 8.4.3.1 MySQL How to open and close a table
https://dev.mysql.com/doc/refman/5.6/en/table-cache.html
Which point out that : “table_open_cache and max_connections The system variable affects the maximum number of files that the server keeps open . If you increase one or two of these values , You may encounter the limit imposed by the operating system on the number of open file descriptors per process . Many operating systems allow you to increase the limit of opening files , Although the methods vary from system to system . Please check your operating system documentation , To determine whether and how limits can be increased .”
2、 read MySQL Of open_files_limit file ,
https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html#sysvar_open_files_limit
Which point out that :“ The operating system allows mysqld Number of open files . The value of this variable at run time is the actual value allowed by the system , It may be different from the value you specified when the server started . stay MySQL Cannot change the number of open files on the system , The value is 0.… Effective open_files_limit The value is based on the value specified when the system starts ( If there is ) as well as max_connections and table_open_cache Value . The server attempts to get the number of file descriptors using the maximum of these three values . If you can't get so many descriptors , The server will try to get as many descriptors as the system allows .”
3、 Check Opened_tables State variables , This variable indicates the number of open table operations since the server was started :
mysql> SHOW GLOBAL STATUS LIKE 'Opened_tables';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| Opened_tables | 43618 |
+---------------+-------+
1 row in set (0.00 sec)
mysql>
4、 Solution
If MySQL The following warning begins :
Could not increase number of max_open_files to more than 10000 (request: 65535)
This means that somewhere is reaching its limit . Let's solve this problem by editing any configuration restrictions . View the following files :
linux-2dk8:/ # find -name mysql.service
./etc/systemd/system/multi-user.target.wants/mysql.service
find: File system loop detected; ‘./.snapshots/1/snapshot’ is part of the same file system loop as ‘.’.
./usr/lib/systemd/system/mysql.service
./sys/fs/cgroup/pids/system.slice/mysql.service
./sys/fs/cgroup/devices/system.slice/mysql.service
./sys/fs/cgroup/systemd/system.slice/mysql.service
linux-2dk8:/ # cat /usr/lib/systemd/system/mysql.service
stay mysql.service Find the configuration in the file
linux-2dk8:/ # cat /usr/lib/systemd/system/mysql.service
# Sets open_files_limit
LimitNOFILE = 10000
Please do not use infinity as a value ; It defaults to 65535. therefore , If you see the value infinity, Please replace it with the required limit .
The modified is :
# Sets open_files_limit
LimitNOFILE = 65535
When this is done , You should now reload the system daemon and restart MySQL service :
systemctl daemon-reload
systemctl restart mysql
adopt MySQL The command line checks for new restrictions . You can use the following query , Make sure the new limit is set :
mysql> SHOW VARIABLES LIKE 'open_files_limit';
+------------------+-------+
| Variable_name | Value |
+------------------+-------+
| open_files_limit | 65535 |
+------------------+-------+
1 row in set (0.01 sec)
边栏推荐
- RDD partition rules of spark
- PHP campus movie website system for computer graduation design
- genius-storage使用文档,一个浏览器缓存工具
- UE4 - how to make a simple TPS role (I) - create a basic role
- Computer graduation design PHP college student human resources job recruitment network
- Minecraft 1.16.5 生化8 模组 2.0版本 故事书+更多枪械
- Gbase 8C database upgrade error
- 我把驱动换成了5.1.35,但是还是一样的错误,我现在是能连成功,但是我每做一次sql操作都会报这个
- 继承的构造函数
- VIM usage guide
猜你喜欢
安装php-zbarcode扩展时报错,不知道有没有哪位大神帮我解决一下呀 php 环境用的7.3
Visualstudio2019 compilation configuration lastools-v2.0.0 under win10 system
Redis如何实现多可用区?
在线怎么生成富文本
leetcode3、實現 strStr()
剑指 Offer 29. 顺时针打印矩阵
RDD conversion operator of spark
高数_向量代数_单位向量_向量与坐标轴的夹角
How does redis implement multiple zones?
Computer graduation design PHP enterprise staff training management system
随机推荐
FTP server, ssh server (super brief)
Pangolin Library: subgraph
0211 embedded C language learning
729. 我的日程安排表 I / 剑指 Offer II 106. 二分图
Overview of spark RDD
How to generate rich text online
It's wrong to install PHP zbarcode extension. I don't know if any God can help me solve it. 7.3 for PHP environment
Using SA token to solve websocket handshake authentication
Structural theme model (I) STM package workflow
Using SA token to solve websocket handshake authentication
Computer graduation design PHP college student human resources job recruitment network
Xshell 7 Student Edition
安装php-zbarcode扩展时报错,不知道有没有哪位大神帮我解决一下呀 php 环境用的7.3
Minecraft 1.18.1、1.18.2模组开发 22.狙击枪(Sniper Rifle)
Global and Chinese markets of screw rotor pumps 2022-2028: Research Report on technology, participants, trends, market size and share
[solution] every time idea starts, it will build project
RDD partition rules of spark
继承的构造函数
2022年版图解网络PDF
Global and Chinese market of wheelchair climbing machines 2022-2028: Research Report on technology, participants, trends, market size and share