Ubuntu 16.04 :
create this file if it does not exist :
/etc/systemd/system/rabbitmq-server.service.d/limits.conf
and add this :
[Service] LimitNOFILE=300000
sudo systemctl daemon-reload
sudo service rabbitmq-server restart
References
https://www.rabbitmq.com/install-debian.html
https://kimambo.de/increasing-limits-for-socket-descriptors-on-ubuntu-for-rabbitmq/