[rabbitmq-discuss] problem with very high queue TTL

Bouh Bouh mr.bouh at gmail.com
Fri Apr 13 16:19:30 BST 2012


Hello,

Working with rabbitmq, I found a nasty behavior relating to queue and their
TTL. If you send a persistant message to a durable queue when the queue
have a TTL over 4.294.967.295 (max 32bit int, or FF FF FF FF), then the
queue is destroyed if the message is not consumed immediately.

Here the simplest test I have made :
a user "test_user" (with a password "test_user") ;
a vhost "p" ;
a queue named "test", durable, with a TTL > 4.294.967.295 (no autodelete) ;
no arguments ;

the direct exchange "amq.direct" bind to the queue with no routing key and
no arguments ;

send a persistant message  (delivery mode = 2, no routing key, no header
nor properties, only a basic payload "bla").

Then the queue is destroyed.

Rabbitmq version 2.7.1
test made with management interface and php client.

I think this is related to the storage of the message (due to the behavior
I observed while testing with shovels).

I may not need a so large TTL, but I think you should know about this.

Here is the error log :

=ERROR REPORT==== 13-Apr-2012::16:09:13 ===
** Generic server <0.31584.0> terminating
** Last message in was {deliver,
{delivery,true,false,<0.9065.1>,
{basic_message,
{resource,<<"p">>,exchange,<<"amq.direct">>},
[<<>>],
{content,60,
{'P_basic',undefined,undefined,[],2,undefined,
undefined,undefined,undefined,undefined,undefined,
undefined,undefined,undefined,undefined},
none,none,
[<<"bla">>]},
<<"Y<C9><FF>e<B1><B6>d<A1> ZU<D6><E9><E0><E2><BE>">>,true},
1}}
** When Server state == {q,
{amqqueue,
{resource,<<"p">>,queue,<<"test">>},
true,false,none,
[{<<"x-message-ttl">>,long,4294967296}],
<0.31584.0>,[],undefined},
none,false,rabbit_variable_queue,
{vqstate,
{0,{[],[]}},
{0,{[],[]}},
{delta,undefined,0,undefined},
{0,{[],[]}},
{0,{[],[]}},
0,
{0,nil},
undefined,
{0,nil},
{qistate,
  "/var/lib/rabbitmq/mnesia/rabbit at rabbithost/queues/BKL005Z7FOY4NF6WMR7ER
BLZV",
{{dict,0,16,16,8,80,48,
{[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]},
{{[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],
[]}}},
[]},
undefined,0,262144,
#Fun<rabbit_variable_queue.2.91259159>,
{0,nil}},
{{client_msstate,msg_store_persistent,
<<72,21,86,28,220,67,150,223,124,123,50,154,225,
109,132,157>>,
{dict,0,16,16,8,80,48,
{[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]},
{{[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],
[]}}},
{state,1134659,
"/var/lib/rabbitmq/mnesia/rabbit at rabbithost/msg_store_persistent"},
rabbit_msg_store_ets_index,
"/var/lib/rabbitmq/mnesia/rabbit at rabbithost/msg_store_persistent",
<0.11231.0>,1138754,1130564,1142841,1146950},
{client_msstate,msg_store_transient,
<<154,31,168,204,117,254,217,155,174,95,243,199,81,
128,111,88>>,
{dict,0,16,16,8,80,48,
{[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]},
{{[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],
[]}}},
{state,1114170,
"/var/lib/rabbitmq/mnesia/rabbit at rabbithost/msg_store_transient"},
rabbit_msg_store_ets_index,
"/var/lib/rabbitmq/mnesia/rabbit at rabbithost/msg_store_transient",
<0.11226.0>,1118269,1110080,1122364,1126465}},
true,0,#Fun<rabbit_amqqueue_process.5.18121064>,0,0,
infinity,0,0,0,0,0,
{rates,
{{1334,325010,274464},0},
{{1334,325010,274464},0},
0.0,0.0,
{1334,325011,275021}},
{0,nil},
{0,nil},
{0,nil},
{0,nil},
0,0,
{rates,
{{1334,325010,274464},0},
{{1334,325010,274464},0},
0.0,0.0,
{1334,325011,275021}}},
{[],[]},
undefined,undefined,undefined,undefined,
{state,fine,5000,undefined},
{0,nil},
4294967296,undefined}
** Reason for termination ==
** {badarg,[{erlang,send_after,[4294967296,<0.31584.0>,drop_expired]},
{rabbit_amqqueue_process,ensure_ttl_timer,1},
{rabbit_amqqueue_process,handle_call,3},
{gen_server2,handle_msg,2},
{proc_lib,wake_up,3}]}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20120413/29752582/attachment.htm>


More information about the rabbitmq-discuss mailing list