[rabbitmq-discuss] erlang client API: transactions

Valentino Volonghi dialtone at gmail.com
Tue Sep 23 22:37:37 BST 2008

Hash: SHA1

On Sep 23, 2008, at 12:15 PM, Valentino Volonghi wrote:

> And here: http://github.com/dialtone/shovel/tree/master

Using all these changes and improvements I managed to write a  
prototype of what I'll need.
There are still a few problems though, the first is the fact that  
tx.commit is synchronous I think.

When I try to load the server with a big number of requests (like 50k  
with 200 concurrency) I
see that the tx.commit goes to timeout in shovel and on the other side  
I see that the persister
is timing out, I suspect it means that it's simply taking a lot of  
time and erlang thinks that it's
a timeout.

Now... I don't have a clear idea of what's the best solution for this  
problem actually. The good thing
though is that when after the crash I restarted the webserver with  
rabbitmq and shovel embedded
I started receiving lines again on the other side, which means that  
basically this way of doing things
is definitely a step in the right direction.

I suspect part of the reason for this timeout is the use of the same  
machine for running the test and
receiving log lines from the test web server (using nice avoid the  
timeout problem). Maybe this
problem should be dealt with at the supervisor level and it should  
simply stop and restart shovel
after a couple of seconds. Does this sound reasonable?

Another good news is that I see about 2700 req/sec handled if I run ab  
directly on the webserver (
so it could even be higher).

I have another question though: how do transactions work? Are the  
messages in a single transaction
sent together or they are just sent separately? Because if it's the  
latter then gzip cannot really do
much if the size of the packet is less than 1500 bytes, it'll be a bit  
faster but still just a single packet.
Am I wrong?

- - Shovel:

=CRASH REPORT==== 23-Sep-2008::20:49:12 ===
     pid: <0.167.0>
     registered_name: shovel
     exception exit: {timeout,
       in function  gen_server:terminate/6
     initial call: gen:init_it(gen_server,<0.166.0>,<0.166.0>,
     ancestors: [shovel_supervisor,<0.165.0>]

- - Remote RabbitMQ:

=ERROR REPORT==== 23-Sep-2008::13:49:32 ===
** Generic server <0.127.0> terminating
** Last message in was {commit,{{11,<0.288.0>},7028}}
** When Server state == {q,{amqqueue,
** Reason for termination ==
** {timeout,

=INFO REPORT==== 23-Sep-2008::13:49:32 ===
closing TCP connection <0.282.0> from

=CRASH REPORT==== 23-Sep-2008::13:49:32 ===
     pid: <0.127.0>
     registered_name: []
     exception exit: {timeout,
       in function  gen_server:terminate/6
     initial call: gen:init_it(gen_server,<0.123.0>,<0.123.0>,

- --
Valentino Volonghi aka Dialtone
Now running MacOS X 10.5
Home Page: http://www.twisted.it

Version: GnuPG v1.4.9 (Darwin)


More information about the rabbitmq-discuss mailing list