[debian-mysql] Bug#1025535: mariadb-server-10.5: Systemd mariadb.service and LimitNOFILE=32768

Alessandro De Zorzi lota at nonlontano.it
Tue Dec 6 11:33:50 GMT 2022


Package: mariadb-server-10.5
Version: mariadb-server
Severity: minor

Dear Maintainer,
unit /lib/systemd/system/mariadb.service
contains line:

	LimitNOFILE=32768

That do not allow set a cust value of open_files_limit in [mysqld] section.
I.e.

	[mysqld]
	open_files_limit        = 104444

does not have any effect:

	MariaDB [(none)]> SHOW VARIABLES LIKE 'open_files_limit';
	+------------------+-------+
	| Variable_name    | Value |
	+------------------+-------+
	| open_files_limit | 32768 |
	+------------------+-------+
	1 row in set (0.001 sec)

if you change LimitNOFILE=32768
in /lib/systemd/system/mariadb.service into:

	LimitNOFILE=infinity
	LimitMEMLOCK=infinity

after a

	systemctl daemon-reload && systemctl restart mariadb.service 

you get 32768 as default but it is possible change value of open_files_limit

	MariaDB [(none)]> SHOW VARIABLES LIKE 'open_files_limit';
	+------------------+--------+
	| Variable_name    | Value  |
	+------------------+--------+
	| open_files_limit | 104444 |
	+------------------+--------+

finally I suggest to analyze if remove LimitNOFILE=32768 is safe
but at least, change the comment that is misleading

[...# Number of files limit. previously [mysqld_safe] open-files-limit...]

TIA
Alessandro - Lota



More information about the pkg-mysql-maint mailing list