[rabbitmq-discuss] =INFO REPORT==== 21-Jul-2010::11:09:35 === Limiting to approx 10, 000, 000 file handles (should hold things for a while?)

Matthew Sackman matthew at rabbitmq.com
Wed Jul 21 10:54:24 BST 2010


Hi John,

On Wed, Jul 21, 2010 at 11:19:48AM +0200, John Apps wrote:
> Just noticed this in the RabbiqMQ log of 1.8.1:
> 
> =INFO REPORT==== 21-Jul-2010::11:09:35 ===
> Limiting to approx 10000000 file handles
> 
> One assumes this does not take much memory? It is presumably possible to
> limit this value, or increase it?

Yes, it can be changed. You need to set a file_handles_high_watermark
entry in rabbitmq.config:

[{rabbit, [{file_handles_high_watermark, X}]}].

The value is autodetected and is simply held as a number - there are no
memory implications. Under unices, ulimit -n is used. Under Windows,
there seems to be a limit around 16M. Eg see
http://blogs.technet.com/markrussinovich/archive/2009/09/29/3283844.aspx
but we knock that down to 10M.

The point of detecting and limiting file descriptor use is that the
Erlang VM blows up quite badly if some core process within it tries to
read a file and finds it can't. Thus we do what we can to try and
monitor Rabbit's use of file descriptors and to ensure there are always
some left over for the VM to use when it needs. A long blog post on this
topic is at
http://www.lshift.net/blog/2010/03/23/the-fine-art-of-holding-a-file-descriptor

Best wishes,

Matthew


More information about the rabbitmq-discuss mailing list