[rabbitmq-discuss] EndOfStreamException after 15 minutes of inactivity

Tim Watson tim at rabbitmq.com
Wed Jun 6 08:32:09 BST 2012


On 06/06/12 07:59, Tim Watson wrote:
> On 05/06/12 21:24, Walter Moore wrote:
>>
>> Hello,
>>
>> I have a long  running, durable, non-auto-delete, non-exclusive, 
>> RabbitMq consumer (.Net client) that works perfectly unless a 15 
>> minute (+- approximately 3 seconds) period of inactivity occurs.  
>> After 15 minutes of messaging inactivity a 
>> "System.IO.EndOfStreamException: SharedQueue closed" exception is 
>> thrown (and continues to be thrown for each subsequent call to 
>> <model>.BasicConsume()).  Is this the expected behavior?  I am using 
>> NoAck = true for each dequeue..
>>
> Hi Walter,
>
> When you say 'non-auto-delete' do you mean to say there is not TTL 
> specified on the messages?
> I also wondered if you have AMQP heartbeats enabled - see 
> http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/2012-May/020236.html 
> for a discussion of this - as that could cause a connection to be 
> terminated after a specified period of inactivity.
>
Looking further at the client code, I can see that the heartbeat is 
implemented on the client as well as the server. If this times out, we 
do indeed get an EndOfStreamException (with a message like "Heartbeat 
missing with heartbeat == <n> seconds") - see 
http://hg.rabbitmq.com/rabbitmq-dotnet-client/file/default/projects/client/RabbitMQ.Client/src/client/impl/ConnectionBase.cs#l541 
for the details.

Looking at the SharedQueue class, I can see that once closed, it will 
continuously throw this exception whenever you try to dequeue. So this 
looks like a possible cause to me. Can you verify whether or not you've 
got AMQP heartbeat timeouts enabled?

Cheers,
Tim

> I'll have a look in the .NET client code, as this doesn't seem like 
> the exception class I'd expect to be thrown in a heartbeat timeout 
> situation, but I thought it was worth mentioning just in case.
>
> If possible, can you tell us exactly (scratching any private data such 
> as the broker, queue and/or exchange names of course) what parameters 
> you're passing to declare the queue and exchange(s) as well as the 
> consumer set up?
>
> Cheers,
> Tim
>>
>> Thank you,
>>
>> *Description: Description: Description: INTLFCStone*
>>
>> **
>>
>> *Walter Moore*
>>
>> Head of Transactional Data Exchange
>>
>> INTL FCStone Inc
>>
>> 230 S. LaSalle Street
>>
>> Suite 10-500
>>
>> Chicago IL  60604
>>
>> *Direct 312-789-2538*
>>
>>
>>
>> _______________________________________________
>> rabbitmq-discuss mailing list
>> rabbitmq-discuss at lists.rabbitmq.com
>> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>
>
>
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20120606/987d2c63/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 19965 bytes
Desc: not available
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20120606/987d2c63/attachment.png>


More information about the rabbitmq-discuss mailing list