日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

MariaDB [Warning] Could not increase number of max_open_files to more than 1024

發布時間:2024/8/26 编程问答 32 豆豆
生活随笔 收集整理的這篇文章主要介紹了 MariaDB [Warning] Could not increase number of max_open_files to more than 1024 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

啟動mariadb,查看mariadb狀態信息時:

systemctl start mariadb
systemctl -l status mariadb
1
2
報錯
在這里插入圖片描述

[Warning] Could not increase number of max_open_files to more than 1024 (request: 8131)
[Warning] Changed limits: max_open_files: 1024 max_connections: 594 (was 4096) table_cache: 200 (was 2000)
出現警告信息:提示最大打開文件數不能超過1024,但依然能夠啟動mariaDB。

解決方法
cat /usr/lib/systemd/system/mariadb.service 查看信息
14 # For example, if you want to increase mysql’s open-files-limit to 10000,
15 # you need to increase systemd’s LimitNOFILE setting, so create a file named
16 # “/etc/systemd/system/mariadb.service.d/limits.conf” containing:
17 # [Service]
18 # LimitNOFILE=10000
1
2
3
4
5
根據前面的信息
mkdir /etc/systemd/system/mariadb.service.d
vim /etc/systemd/system/mariadb.service.d/limits.conf ’ //添加 ’
[Service]
LimitNOFILE=10000 ’ //根據前面的warning信息,數值只需要大于8131即可,還可以改為infinity ’
1
2
3
4
修改完之后,重新加載配置
systemctl --system-daemon-reload
1
已解決
如圖:
在這里插入圖片描述

拓展
ulimit -n 查看當前進程的max_open_files
cat /proc/sys/fs/file-max 查看系統最大文件數
/etc/security/limits.conf是一個很重要的文件

總結

以上是生活随笔為你收集整理的MariaDB [Warning] Could not increase number of max_open_files to more than 1024的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。