[rabbitmq-discuss] Increasing the file descriptors limit

Tim Watson tim at rabbitmq.com
Thu Jan 17 12:47:39 GMT 2013


Hi 

On 17 Jan 2013, at 12:26, Jean Paul Galea wrote:
> We're trying to increase the file descriptors limits for RabbitMQ to no avail. Here's what we did;
> 
> ~# # check the current nofile value
> ~# su rabbitmq -s /bin/sh -c 'ulimit -n'
> 1024
> 
> ~# # set soft,hard nofile limit for 'rabbitmq' user to 102400
> ~# cat >> /etc/security/limits.conf << "EOF"
> rabbitmq	-	nofile	102400
> EOF
> 

Don't you need to change /etc/sysctl.conf as well?

> ~# # pam_limits.so is required for limits.conf to take affect
> ~# cat >> /etc/pam.d/common-session << "EOF"
> session	required	pam_limits.so
> EOF
> 
> ~# # verifies new setting
> ~# su rabbitmq -s /bin/sh -c 'ulimit -n'
> 102400
> 

Hmn, does `sysctl fs.file-max` return the same?

> However, RabbitMQ fails to start up with this limit. We have tried restarting the RabbitMQ service and also a system reboot.
> 
> ~# rabbitmqctl status
> {file_descriptors,
> [{total_limit,924},{total_used,3},{sockets_limit,829},{sockets_used,1}]},
> 
> ~# rabbitmqctl eval 'proplists:get_value(max_fds, erlang:system_info(check_io)).'
> 1024
> ...done.

Was erlang compiled with epoll support enabled? Erlang will fall back on 'select' if it can't find/use epoll or if epoll is not enabled during compilation, and that will leave you with max 1024 fd limit, regardless of what the OS will allow.



More information about the rabbitmq-discuss mailing list