Changing open file limit on a specific process PID
Morning, I am getting connection errors using mosquitto due to connection failures. This is being tested on an AWS t2.small machine, Ubuntu 14.04LTS and the filesystem changes for the limits reflect fine;
ulimit -Hn
64000
ulimit -Sn
64000
/etc/sysctl.conf has the following;
fs.file-max = 10000000
fs.nr_open = 10000000
/etc/security/limits.conf has the following;
* soft nofile 64000
* hard nofile 64000
root soft nofile 64000
root hard nofile 64000
Both PAM files have been updated as well to allow the changes. So here is the problem;
I have tried running the process as the default mosquitto user as well as root with the same results. Ulimit (as shown above) is allowing the 64k file, but after 1k connections there failing and a check at the process level is the issue;
cat /proc/pid/limits shows;
Max open files 1024 4096 files
So, stuck on how to change the per process open file limit. Thanks for any help/suggestions.
|