[rabbitmq-discuss] channel.flow_ok{active=false} and java client 1.8.1

Simon MacMullen simon at rabbitmq.com
Wed Jul 21 11:03:49 BST 2010


Odd. Those are exactly the symptoms you'd expect to see if you were 
using an old version of the Java client that doesn't support 
channel.flow; recent versions of the server will forcibly disconnect 
such misbehaving clients rather than risk running out of memory.

Umm, you are sure you're using 1.8.1? No older versions lying around on 
the classpath?

Cheers, Simon

On 21/07/10 10:24, Chester Shen wrote:
> Hi Simon
>
> Thanks for the quick reply!
>
> I asked the question because my client always get the exception:
> "com.rabbitmq.client.AlreadyClosedException: clean connection shutdown;
> reason: Attempt to use closed channel" when it hit the memory watermark.
> In the log I can find this:
>
> =INFO REPORT==== 21-Jul-2010::11:08:13 ===
> vm_memory_high_watermark set. Memory used:906599728 allowed:825611059
>
> =INFO REPORT==== 21-Jul-2010::11:08:13 ===
>      alarm_handler: {set,{vm_memory_high_watermark,[]}}
>
> =INFO REPORT==== 21-Jul-2010::11:08:15 ===
> vm_memory_high_watermark clear. Memory used:809917968 allowed:825611059
>
> =INFO REPORT==== 21-Jul-2010::11:08:15 ===
>      alarm_handler: {clear,vm_memory_high_watermark}
>
> =INFO REPORT==== 21-Jul-2010::11:08:16 ===
> vm_memory_high_watermark set. Memory used:880253288 allowed:825611059
>
> =INFO REPORT==== 21-Jul-2010::11:08:16 ===
>      alarm_handler: {set,{vm_memory_high_watermark,[]}}
>
> =INFO REPORT==== 21-Jul-2010::11:08:19 ===
> vm_memory_high_watermark clear. Memory used:778205448 allowed:825611059
>
> =INFO REPORT==== 21-Jul-2010::11:08:19 ===
>      alarm_handler: {clear,vm_memory_high_watermark}
>
> =INFO REPORT==== 21-Jul-2010::11:08:21 ===
> vm_memory_high_watermark set. Memory used:845297232 allowed:825611059
>
> =INFO REPORT==== 21-Jul-2010::11:08:21 ===
>      alarm_handler: {set,{vm_memory_high_watermark,[]}}
>
> =ERROR REPORT==== 21-Jul-2010::11:08:23 ===
> connection<0.3067.2>  (running), channel 1 - error:
> {amqp_error,precondition_failed,
>              "timeout waiting for channel.flow_ok{active=false}",none}
>
> =INFO REPORT==== 21-Jul-2010::11:08:24 ===
> vm_memory_high_watermark clear. Memory used:131894968 allowed:825611059
>
> =INFO REPORT==== 21-Jul-2010::11:08:24 ===
>      alarm_handler: {clear,vm_memory_high_watermark}
>
> It looks like that the client failed to reply channel.flow{active=false}
> in the first place, so after 10 seconds the channel had been terminated.
>
>
>
> On Wed, 2010-07-21 at 09:38 +0100, Simon MacMullen wrote:
>> On 21/07/10 08:26, Chester Shen wrote:
>>> In my huge memory consumption program when it hit the memory watermark
>>> the client will receive a channel.flow{active=false} which I can capture
>>> in FlowListener, then I need to send a channel.flow_ok{active=false} to
>>> acknowledge it, but I do not know how to do it in java client 1.8.1.
>>> Is there a method that I miss or it has not been implemented yet?
>>
>> Hi Chester. You shouldn't need to do that - the Java client should
>> receive the flow message, automatically respond with flow-ok, and cause
>> Channel.basicPublish to block until it sees a channel.flow{active=true}.
>>
>> The FlowListener is just there in case you need to be aware that this is
>> happening; in normal use you shouldn't need to do anything.
>>
>> Cheers, Simon
>> _______________________________________________
>> rabbitmq-discuss mailing list
>> rabbitmq-discuss at lists.rabbitmq.com
>> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>
>



More information about the rabbitmq-discuss mailing list