[rabbitmq-discuss] Rabbit Crashing

Marek Majkowski majek04 at gmail.com
Tue Nov 29 12:53:20 GMT 2011


On Tue, Nov 29, 2011 at 12:06, Bruno Carneiro <brunoac88 at gmail.com> wrote:
> Thank you! I installed the management plugin and I could see the file
> descriptors increasing until the limit.
> Then I set the limit using the command you suggest (ulimit -n).
> Everything worked fine.

Great. Rabbit usually behaves if it has enough room.
Monitoring memory, file descriptors, cpu and disk usage
is generally a good practice.

> One more question, I would like to know where did you find
> that  "{error,emfile}" is (errno 24 - "too many file descriptors opened").

That was the easy part:
https://duckduckgo.com/?q=emfile

> Thank you again, you really help me!

Glad to hear that!

Cheers,
 Marek

> Cheers,
>
> Bruno Carneiro
>
>
> 2011/11/28 Marek Majkowski <majek04 at gmail.com>
>>
>> On Mon, Nov 28, 2011 at 18:57, Bruno Carneiro <brunoac88 at gmail.com> wrote:
>> > Hi Folks,
>> > I'm using Rabbit 2.6.1 with the plugins:
>> > * amqp_client-2.6.1
>> > * mochiweb-1.3-rmq2.6.1-git9a53dbd
>> > * rabbitmq_jsonrpc-2.6.1
>> > * rabbitmq_jsonrpc_channel-2.6.1
>> > * rabbitmq_jsonrpc_channel_examples-2.6.1
>> > * rabbitmq_mochiweb-2.6.1
>> > * rfc4627_jsonrpc-2.6.1-git30c8498
>> > * webmachine-1.7.0-rmq2.6.1-hg0c4b60a
>> >
>> > When I start Rabbit it goes down after a few minutes. Using list_queues
>> > I
>> > get:
>> > unable to connect to node rabbit at HackSprintFreud: nodedown
>> > Logs:
>> > =ERROR REPORT==== 28-Nov-2011::16:46:58 ===
>> >     application: mochiweb
>> >     "Accept failed error"
>> >     "{error,emfile}"
>>
>>
>> Just a blind guess:
>>  EMFILE (errno 24 - "too many file descriptors opened")
>>
>> Maybe you have too many files opened? You can see
>> the numbers using management plugin.
>>
>> On linux you can increase the limit by running
>> `ulimit -n <number>`, but you have to be root.
>>
>> Usually, rabbit tries to optimize the usage of file descriptors,
>> in case when you have many queues it can mean that rabbit
>> opens loads of files. But as you open more and more network
>> sockets the number of opened files should drop.
>>
>> This may not be a case for jsonrpc - AFAIK it doesn't have
>> code for dealing with usual rabbitmq file descriptor
>> counters. Theoretically in that case, when you have many
>> files opened by jsonrpc - you may hit the wall.
>>
>> I suggest run the management plugin and checking the
>> file descriptors counters, trying to get understanding about
>> jsonrpc plugin usage. And increasing the file descriptor
>> limit if necessary.
>>
>> Cheers,
>>    Marek
>
>


More information about the rabbitmq-discuss mailing list