Yes I know this question has been asked before and I have tried all the solutions I have seen and none of them work for me. We are running Ubuntu 12, and we have a process that automatically gets launched by upstart every time the machine boots up. I have gone into /etc/security/limits.conf and have added these lines:
* hard nofile 65000
* soft nofile 32000
root hard nofile 65000
root soft nofile 32000
I also went into /etc/pam.d/common-session and added this line:
session required pam_limits.so
In order to make this work for non-interactive processes, I also went into /etc/pam.d/common-session-noninteractive and added the exact same line.
When I login as our adminstrator user (who is on the sudo list, and I'll call this user SUDOUSER), I see that the limits are now 32000 as expected when I do a ulimit -a.
Then I do a reboot of the entire machine, to make sure the limits stick for new processes, like the process that gets launched by upstart after reboot.
However, after the reboot, when I look at the persistent process that starts at runtime, I get the process ID (say 12345) and then do cat /proc/12345/limits and I see the limits are still the defaults (1024 soft, 4096 hard).
So what am I doing wrong?
/etc/security/limits.conf
only affects logins?