Details
-
Task
-
Status: Open (View Workflow)
-
Minor
-
Resolution: Unresolved
-
None
-
None
Description
MariaDB uses open_files_limit to set its limit on open file descriptors with setrlimit:
https://github.com/MariaDB/server/blob/5abc79dd7ab2fccb4b05ca38a512ec816d2f8e52/mysys/my_file.c#L42
And it only allows a maximum limit of OS_FILE_LIMIT:
https://github.com/MariaDB/server/blob/5abc79dd7ab2fccb4b05ca38a512ec816d2f8e52/mysys/my_file.c#L102
And OS_FILE_LIMIT is currently defined as UINT_MAX (4294967295):
RLIMIT_INFINITY seems to be defined as ULLONG_MAX on my system:
$ grep "RLIM_INFINITY" /usr/include/bits/resource.h
|
# define RLIM_INFINITY ((__rlim_t) -1)
|
# define RLIM_INFINITY 0xffffffffffffffffuLL
|
#define RLIM_SAVED_MAX RLIM_INFINITY
|
#define RLIM_SAVED_CUR RLIM_INFINITY
|
So if we increased OS_FILE_LIMIT to ULLONG_MAX, it looks like we could allow users to set an infinite limit.
Attachments
Issue Links
- relates to
-
MDEV-18410 Can't set mysqld_safe's open-files-limit to unlimited
- Open