[rabbitmq-discuss] Just publishing messages causes rabbit_writer:mainloop to hang and simultaneous pub problem

Ben Hood 0x6e6562 at gmail.com
Thu Apr 17 08:08:12 BST 2008


Joe,

On 17 Apr 2008, at 01:21, Joe Lee wrote:
> BTW, if you don't supply a host name when starting the connection,  
> the client will start in a direct mode using native Erlang message  
> passing rather than AMQP wire framing. This means that the client  
> and server run in the same interpreter and eliminate the network  
> overhead.
> Is this valid also when running rabbitmq erlang client and rabbitmq  
> server on separate erlang nodes?

Currently not. At the moment the direct driver only uses local message  
passing. It is conceivable that the direct driver could use Erlang's  
internode communication, but I guess you'd have to message this  
approach against normal AMQP wire framing. In both approaches you  
would have to serialize and deserialize to get the data over the wire.  
If the Erlang variant is significantly more efficient that AMQP, it  
might be worth looking into and benchmarking.

The main point  is that the client API provides a uniform interface to  
user code, irrespective of the actual physical message passing  
technology.

> I sent 3 amqp message to the rabbitmq broker from a separate erlang  
> client node.  The three 3 amqp messages create 3  
> rabbit_writer:mainloop/1 processes.  This rabbit_writer:mainloop/1  
> process never goes away.
>
> <0.71.0>              rabbit_writer:mainloop/1                
> 233      132    0
>                       rabbit_writer:mainloop/1                 2
> <0.72.0>              rabbit_writer:mainloop/1                
> 233      132    0
>                       rabbit_writer:mainloop/1                 2
> <0.73.0>              rabbit_writer:mainloop/1                
> 233      132    0
>                       rabbit_writer:mainloop/1                 2
>
> One rabbit_writer:mainloop process traced:
>
> initial_call: rabbit_writer:mainloop/1
> current_function: rabbit_writer:mainloop/1
> heap_size: 233
> stack_size: 2
> reductions: 132
> trap_exit: false
> <0.72.0>: getting_linked   <0.112.0>
>
> After that I increased number of processes on a single erlang node  
> to something higer than 50 000 and sent 50 000 messages.  For some  
> reason, 50 000 rabbit_writer:mainloop processes are still there.   
> They don't go away.  Processes only go away when I restart the  
> rabbit erlang client node.
>
> 7> erlang:system_info(process_count).
> 50044

Can you send the source of the test that is producing this behaviour,  
please?

HTH,

Ben




More information about the rabbitmq-discuss mailing list