Hi,
I have installed
MariaDB 10.1.35
in a container (LXC) with Debian 9.5.
Starting the database service I get this warning:
Nov 02 03:23:50 ct125-netdot mysqld[25687]: 2018-11-02 3:23:50 140396535071680 [Warning] Could not increase number of max_open_files to more than 4096 (request: 4182)
MariaDB [(none)]> SHOW GLOBAL VARIABLES LIKE 'open_files_limit';
+------------------+-------+
| Variable_name | Value |
+------------------+-------+
| open_files_limit | 4096 |
+------------------+-------+
1 row in set (0.00 sec)
Checking MariaDB documentation "Server System Variables" here (https://mariadb.com/kb/en/library/server-system-variables/#open_files_limit) I get this info:
open_files_limit
- Description: The number of file descriptors available to mysqld. Increase if you are getting the
Too many open files
error. If set to 0, then mysqld will reserve max_connections*5 or max_connections + table_open_cache*2 (whichever is larger) number of files. Note that MariaDB cannot set this to exceed the hard limit imposed by the operating system, and you may need to change this. For example, by adding the following lines to /etc/security/limits.conf
mysql soft nofile 65535
mysql hard nofile 65535
rebooting, and then create /etc/systemd/system/mysqld.service.d/filelimit.conf
or /etc/systemd/system/mariadb.service.d/filelimit.conf
(corresponding to the service name).
[Service]
LimitNOFILE=infinity
I have modified file /etc/security/limits.conf
accordingly:
mysql soft nofile 4182
mysql hard nofile 4182
And I have create file /etc/systemd/system/mariadb.service.d/filelimit.conf
:
root@ct125-netdot:~# more /etc/systemd/system/mariadb.service.d/filelimit.conf
[Service]
LimitNOFILE=4182
Why is MariaDB writing this warning?
THX