Answer the question
In order to leave comments, you need to log in
Debian 8, how to properly increase LimitNOFILE in systemd?
Actually, what is the question: in Debian 8, for some services (including nginx and apache), configuration files for systemd are generated based on scripts in /etc/init.d, and they end up in /run/systemd/generator.late /, and, as I understand it, are overwritten with each system restart.
I googled that LimitNOFILE must be written in one of the ways:
/usr/lib/systemd/system/<servicename>.service
/lib/systemd/system/<servicename>.service
/etc/systemd/system/<servicename>.d/override.conf
Answer the question
In order to leave comments, you need to log in
That's right, they won't be there.
You create /etc/systemd/system/nginx.d/override.conf
and write your limits there
. Since this file is not part of the package, it will not be overwritten during updates.
Only after creating the file, do systemctl daemon-reload
To override specific units, instead of manually creating a folder and file, it is convenient to use: systemctl edit юнит
To override for all system processes, as it was before through /etc/security/limits.conf, you can now make the file /etc/systemd/system.conf.d/limit. conf with the DefaultLimitNOFILE= directive and others
man systemd-system.conf
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question