I am trying to install rabbitmq-server on Ubuntu 14.04.4 LTS.
In /etc/default/rabbitmq-server it says:
# Maximum number of open file handles. This will need to be increased
# to handle many simultaneous connections. Refer to the system
# documentation for ulimit (in man bash) for more information.
#
ulimit -S -n 65536
(I raised the value to what the rabbitmq documentation suggests.) It makes no difference if I put the line in /etc/init.d/rabbitmq-server instead.
Additionally, I have the following as the only entry in /etc/security/limits.conf (with an empty limits.d):
* hard nofile 65536
I can set my ulimit as a normal user:
$ ulimit -n
1024
$ ulimit -n 65536
$ ulimit -n
65536
But when I do sudo service rabbitmq-server restart:
/etc/init.d/rabbitmq-server: 9: ulimit: error setting limit (Invalid argument)
I have restarted the machine to make sure it's not to do with my ssh session or anything like that. What am I missing?