How to get /etc/security/limits.conf changes reflected for processes running as a headless user?

To increase the FD limit for all processes on an Ubuntu Linux machine, we made the following changes to /etc/security/limits.conf

  soft nofile 10000 hard nofile 10000 

We also added the required pam_limits.so session to /etc/pam.d/login . Changes were reflected for all users who logged out and logged in again. No matter what new processes start with these users, new FD restrictions arise.

But for processes that run under a headless user, changes are not reflected. How can changes be reflected for processes that also work with the headless user?

+7
source share
1 answer

I had the same problem (with root / myuser) and could not find the final answer. I just added

ulimit -n 64000

There is a script in init.d that starts the process (in this case Elastic searches), and this seems to do the trick.

Hope someone else knows a better solution!

+5
source

All Articles