On Nov 13, 2023, at 16:50, Alex <mysqlstud...@gmail.com> wrote:
The file /etc/security/limits.conf is only used for a process that passes through the PAM stack, such as users logging in or a process launched through the old init process that effectively used “su”. In systemd, the MariaDB process is launched directly as the user defined in the unit file, so it isn’t affected by the pam_limits module. You want to set the LimitNOFILE control in the Service section of the systemd unit. Here’s documentation for the setting: You’d add this by running `systemctl edit mariadb.service` and create a `[Service]` section with the limit defined. (I’m guessing at the unit name, please use the right name where appropriate) I’ll note that the man page above says this about LimitNOFILE: Don't use. Be careful when raising the soft limit above 1024, since select(2) cannot function with file descriptors above 1023 on Linux. Nowadays, the hard limit defaults to 524288, a very high value compared to historical defaults. Typically applications should increase their soft limit to the hard limit on their own, if they are OK with working with file descriptors above 1023, i.e. do not use select(2). Note that file descriptors are nowadays accounted like any other form of memory, thus there should not be any need to lower the hard limit. Use MemoryMax= to control overall service memory use, including file descriptor memory.-- Jonathan Billings |
_______________________________________________ users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-le...@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue