首页
工具
隐私协议
作品
更多
关于我们
Search
1
proguard-rules出现unresolved class name
913 阅读
2
onActivityResult过时了,registerForActivityResult使用方法
889 阅读
3
FlexboxLayout+recyclerView实现自动换行
857 阅读
4
android5遇到INSTALL_FAILED_DEXOPT 解决办法
640 阅读
5
Room数据库Schema export Error
575 阅读
默认分类
mysql
android
android深入
Jetpack Compose
Android传感器
php
Yii2
windows
webrtc
登录
Search
标签搜索
android
kotlin
webrtc
kurento
nginx
flutter
adb
rsa
微信
git
mysql
Yii2
md5
加密
dart
aes
wechat
windows
小程序
dexopt
Kornan
累计撰写
72
篇文章
累计收到
3
条评论
首页
栏目
默认分类
mysql
android
android深入
Jetpack Compose
Android传感器
php
Yii2
windows
webrtc
页面
工具
隐私协议
作品
关于我们
搜索到
1
篇与
mysql
的结果
2020-04-10
设置max_connections无效
在/etc/mysql/my.cnf中设置max_connections=512进入Mysql查看发现还是214mysql> show global variables like '%max_connecti%'; +-----------------+-------+ | Variable_name | Value | +-----------------+-------+ | max_connections | 214 | +-----------------+-------+ 1 row in set (0.01 sec)google了一番后,说是跟open_files_limit有关,每个connect都会打开几个文件,查了下open_files_limit为1024。mysql> show global variables like '%open_files_limit%'; +------------------+-------+ | Variable_name | Value | +------------------+-------+ | open_files_limit | 1024 | +------------------+-------+ 1 row in set (0.00 sec)在/etc/mysql/my.cnf中加上open_files_limit = 4096重启mysql后查看mysql> show global variables like '%max_connecti%'; +-----------------+-------+ | Variable_name | Value | +-----------------+-------+ | max_connections | 512 | +-----------------+-------+ 1 row in set (0.01 sec)mysql> show global variables like '%open_files_limit%'; +------------------+-------+ | Variable_name | Value | +------------------+-------+ | open_files_limit | 4096 | +------------------+-------+ 1 row in set (0.00 sec)open_files_limit最大值也是有限制的,设置太大也会变成默认1024,可以在/etc/security/limits.conf加上并重启系统* soft nofile 65536 * hard nofile 65536还有就是启动mysql的service加上LimitNOFILE=65535并重启mysql,这样可以解除open file的限制,LimitNOFILE=65535
2020年04月10日
244 阅读
0 评论
0 点赞