You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by Adel Boutros <ad...@live.com> on 2016/05/25 08:25:10 UTC

[Proton-c] Random value of idle timeout causing error when below 1000

Hello,
From time to time, we have this annoying random bug when using proton-c client:
Error: amqp:connection:forced: Requested idle timeout of 776 is too low. The minimum supported timeout is1000.
The value of the timeout is random: sometimes it is as low as "2" and sometimes as high as "998". Re-launching the test makes it pass.
Do you know what could be the cause of such error?
Regards,Adel 		 	   		  

Re: [Proton-c] Random value of idle timeout causing error when below 1000

Posted by Gordon Sim <gs...@redhat.com>.
On 26/05/16 18:04, Adel Boutros wrote:
> I set the timeout explicitly to "200" but got an error indicating number "100". The error is 100% reproducible in this case and the number "100" always shows in the error message.I think there is a communication problem between proton and the broker.

That is a a different issue. From the AMQP spec:

   To avoid spurious timeouts, the value in idle-time-out SHOULD be
   half the peers actual timeout threshold.

So that is why proton sends 100 when you indicate it should timeout 
after 200.

That fact that this is non-random suggests to me that it was the value 
of timeout that was not being initialised before.

> proton::connection conn = e.container().connect(url, proton::connection_options().idle_timeout(proton::duration(200)));
> Error: amqp:connection:forced: Requested idle timeout of 100 is too low. The minimum supported timeout is1000
> How do you activate protocol trace logging?

The easiest way is to set the env var PN_TRACE_FRM=1.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


RE: [Proton-c] Random value of idle timeout causing error when below 1000

Posted by Adel Boutros <ad...@live.com>.
Indeed, this makes sense.
In that case the way we are retrieving the value of the timeout is bugging. I will replace it with a constant value in our C/C++ code.
Thank you guys for your help.
Adel

> Date: Thu, 26 May 2016 13:11:28 -0400
> From: kgiusti@redhat.com
> To: users@qpid.apache.org
> Subject: Re: [Proton-c] Random value of idle timeout causing error when below 1000
> 
> Hi, the AMQP 1.0 spec is ambiguous in its description of the idle-timeout.
> 
> The spec recommends that the sender of the timeout value actually sends half of its _configured_ value.  That means if you configure 200 milliseconds, the on-the-wire-value (hence the value received by the peer) should be half the configured value
> 
> So what you are seeing is expected:  200 configured ==> 100 sent to peer.
> 
> -K
> 
> ----- Original Message -----
> > From: "Adel Boutros" <ad...@live.com>
> > To: users@qpid.apache.org
> > Sent: Thursday, May 26, 2016 1:04:08 PM
> > Subject: RE: [Proton-c] Random value of idle timeout causing error when below 1000
> > 
> > I set the timeout explicitly to "200" but got an error indicating number
> > "100". The error is 100% reproducible in this case and the number "100"
> > always shows in the error message.I think there is a communication problem
> > between proton and the broker.
> > proton::connection conn = e.container().connect(url,
> > proton::connection_options().idle_timeout(proton::duration(200)));
> > Error: amqp:connection:forced: Requested idle timeout of 100 is too low. The
> > minimum supported timeout is1000
> > How do you activate protocol trace logging?
> > Regards,Adel
> > 
> > > Date: Thu, 26 May 2016 17:46:16 +0100
> > > Subject: Re: [Proton-c] Random value of idle timeout causing error when
> > > below 1000
> > > From: robbie.gemmell@gmail.com
> > > To: users@qpid.apache.org
> > > 
> > > The message is coming from the java broker, which is enforcing a
> > > minimum value for peers to set request for idle_timeout, and
> > > indicating the client requested a value below that. As Gordon says, it
> > > sounds like something might not be getting initialised properly. If
> > > you can check that and rule it out, then after that its possibly worth
> > > turning on protocol trace logging (or using wireshark) and checking
> > > what is actually being sent.
> > > 
> > > Robbie
> > > 
> > > On 26 May 2016 at 17:29, Adel Boutros <ad...@live.com> wrote:
> > > >
> > > >
> > > >
> > > > Hello Gordon,
> > > > When the error occurs, the displayed value of idle_time is always random
> > > > (2, 5, 997, 667, etc.). However when the error doesn't occur, I don't
> > > > know what the value is. If you want I can log the value everytime. Could
> > > > you point me to where this error message is coming because I cannot find
> > > > it in the code? (I searched for "The minimum supported timeout is" but
> > > > found nothing)
> > > > The value is passed from Java using JNI calls but it is a constant. I
> > > > doubt Java would be changing the value.
> > > > Regards,Adel
> > > >
> > > >> Subject: Re: [Proton-c] Random value of idle timeout causing error when
> > > >> below 1000
> > > >> To: users@qpid.apache.org
> > > >> From: gsim@redhat.com
> > > >> Date: Thu, 26 May 2016 16:57:33 +0100
> > > >>
> > > >> On 26/05/16 09:19, Adel Boutros wrote:
> > > >> > Hello Gordon,
> > > >> > We are using proton 0.12.0 c++ binding API (proton::handler).
> > > >> > We are connecting to a Qpid Java Broker (6.0.0).
> > > >> > We tried to fix the issue by adding a timeout of a big value but it
> > > >> > don't seem to affect the behavior.
> > > >> > Unfortunately, as this bug is random, I don't have a reproducer.
> > > >>
> > > >> Is it that the value is not always random? or that it is always random,
> > > >> but only sometimes falls outside the acceptable range?
> > > >>
> > > >> > It suffises to have a producer and consumer and trying to connect many
> > > >> > times until this error occurs.If you want, I can try to have a
> > > >> > program which will loop indefinitely with a consumer and a producer
> > > >> > connecting until I have the error and I can share that code with you.
> > > >> > This is the code where we set the timeout to 5000 for example:
> > > >> > proton::connection conn = e.container().connect(url,
> > > >> > proton::connection_options().idle_timeout(timeout));conn.open_receiver(url.path());
> > > >>
> > > >> I tried modifying one of the cpp examples to set a timeout, and it is
> > > >> always set as I request, never random.
> > > >>
> > > >> Is it possible that your 'timeout' variable above is somehow not always
> > > >> being initialised correctly?
> > > >>
> > > >>
> > > >> ---------------------------------------------------------------------
> > > >> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
> > > >> For additional commands, e-mail: users-help@qpid.apache.org
> > > >>
> > > >
> > > >
> > > 
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
> > > For additional commands, e-mail: users-help@qpid.apache.org
> > > 
> > 
> 
> -- 
> -K
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
> For additional commands, e-mail: users-help@qpid.apache.org
> 
 		 	   		  

Re: [Proton-c] Random value of idle timeout causing error when below 1000

Posted by Ken Giusti <kg...@redhat.com>.
Hi, the AMQP 1.0 spec is ambiguous in its description of the idle-timeout.

The spec recommends that the sender of the timeout value actually sends half of its _configured_ value.  That means if you configure 200 milliseconds, the on-the-wire-value (hence the value received by the peer) should be half the configured value

So what you are seeing is expected:  200 configured ==> 100 sent to peer.

-K

----- Original Message -----
> From: "Adel Boutros" <ad...@live.com>
> To: users@qpid.apache.org
> Sent: Thursday, May 26, 2016 1:04:08 PM
> Subject: RE: [Proton-c] Random value of idle timeout causing error when below 1000
> 
> I set the timeout explicitly to "200" but got an error indicating number
> "100". The error is 100% reproducible in this case and the number "100"
> always shows in the error message.I think there is a communication problem
> between proton and the broker.
> proton::connection conn = e.container().connect(url,
> proton::connection_options().idle_timeout(proton::duration(200)));
> Error: amqp:connection:forced: Requested idle timeout of 100 is too low. The
> minimum supported timeout is1000
> How do you activate protocol trace logging?
> Regards,Adel
> 
> > Date: Thu, 26 May 2016 17:46:16 +0100
> > Subject: Re: [Proton-c] Random value of idle timeout causing error when
> > below 1000
> > From: robbie.gemmell@gmail.com
> > To: users@qpid.apache.org
> > 
> > The message is coming from the java broker, which is enforcing a
> > minimum value for peers to set request for idle_timeout, and
> > indicating the client requested a value below that. As Gordon says, it
> > sounds like something might not be getting initialised properly. If
> > you can check that and rule it out, then after that its possibly worth
> > turning on protocol trace logging (or using wireshark) and checking
> > what is actually being sent.
> > 
> > Robbie
> > 
> > On 26 May 2016 at 17:29, Adel Boutros <ad...@live.com> wrote:
> > >
> > >
> > >
> > > Hello Gordon,
> > > When the error occurs, the displayed value of idle_time is always random
> > > (2, 5, 997, 667, etc.). However when the error doesn't occur, I don't
> > > know what the value is. If you want I can log the value everytime. Could
> > > you point me to where this error message is coming because I cannot find
> > > it in the code? (I searched for "The minimum supported timeout is" but
> > > found nothing)
> > > The value is passed from Java using JNI calls but it is a constant. I
> > > doubt Java would be changing the value.
> > > Regards,Adel
> > >
> > >> Subject: Re: [Proton-c] Random value of idle timeout causing error when
> > >> below 1000
> > >> To: users@qpid.apache.org
> > >> From: gsim@redhat.com
> > >> Date: Thu, 26 May 2016 16:57:33 +0100
> > >>
> > >> On 26/05/16 09:19, Adel Boutros wrote:
> > >> > Hello Gordon,
> > >> > We are using proton 0.12.0 c++ binding API (proton::handler).
> > >> > We are connecting to a Qpid Java Broker (6.0.0).
> > >> > We tried to fix the issue by adding a timeout of a big value but it
> > >> > don't seem to affect the behavior.
> > >> > Unfortunately, as this bug is random, I don't have a reproducer.
> > >>
> > >> Is it that the value is not always random? or that it is always random,
> > >> but only sometimes falls outside the acceptable range?
> > >>
> > >> > It suffises to have a producer and consumer and trying to connect many
> > >> > times until this error occurs.If you want, I can try to have a
> > >> > program which will loop indefinitely with a consumer and a producer
> > >> > connecting until I have the error and I can share that code with you.
> > >> > This is the code where we set the timeout to 5000 for example:
> > >> > proton::connection conn = e.container().connect(url,
> > >> > proton::connection_options().idle_timeout(timeout));conn.open_receiver(url.path());
> > >>
> > >> I tried modifying one of the cpp examples to set a timeout, and it is
> > >> always set as I request, never random.
> > >>
> > >> Is it possible that your 'timeout' variable above is somehow not always
> > >> being initialised correctly?
> > >>
> > >>
> > >> ---------------------------------------------------------------------
> > >> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
> > >> For additional commands, e-mail: users-help@qpid.apache.org
> > >>
> > >
> > >
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
> > For additional commands, e-mail: users-help@qpid.apache.org
> > 
> 

-- 
-K

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


RE: [Proton-c] Random value of idle timeout causing error when below 1000

Posted by Adel Boutros <ad...@live.com>.
I set the timeout explicitly to "200" but got an error indicating number "100". The error is 100% reproducible in this case and the number "100" always shows in the error message.I think there is a communication problem between proton and the broker.
proton::connection conn = e.container().connect(url, proton::connection_options().idle_timeout(proton::duration(200)));
Error: amqp:connection:forced: Requested idle timeout of 100 is too low. The minimum supported timeout is1000
How do you activate protocol trace logging?
Regards,Adel

> Date: Thu, 26 May 2016 17:46:16 +0100
> Subject: Re: [Proton-c] Random value of idle timeout causing error when below 1000
> From: robbie.gemmell@gmail.com
> To: users@qpid.apache.org
> 
> The message is coming from the java broker, which is enforcing a
> minimum value for peers to set request for idle_timeout, and
> indicating the client requested a value below that. As Gordon says, it
> sounds like something might not be getting initialised properly. If
> you can check that and rule it out, then after that its possibly worth
> turning on protocol trace logging (or using wireshark) and checking
> what is actually being sent.
> 
> Robbie
> 
> On 26 May 2016 at 17:29, Adel Boutros <ad...@live.com> wrote:
> >
> >
> >
> > Hello Gordon,
> > When the error occurs, the displayed value of idle_time is always random (2, 5, 997, 667, etc.). However when the error doesn't occur, I don't know what the value is. If you want I can log the value everytime. Could you point me to where this error message is coming because I cannot find it in the code? (I searched for "The minimum supported timeout is" but found nothing)
> > The value is passed from Java using JNI calls but it is a constant. I doubt Java would be changing the value.
> > Regards,Adel
> >
> >> Subject: Re: [Proton-c] Random value of idle timeout causing error when below 1000
> >> To: users@qpid.apache.org
> >> From: gsim@redhat.com
> >> Date: Thu, 26 May 2016 16:57:33 +0100
> >>
> >> On 26/05/16 09:19, Adel Boutros wrote:
> >> > Hello Gordon,
> >> > We are using proton 0.12.0 c++ binding API (proton::handler).
> >> > We are connecting to a Qpid Java Broker (6.0.0).
> >> > We tried to fix the issue by adding a timeout of a big value but it don't seem to affect the behavior.
> >> > Unfortunately, as this bug is random, I don't have a reproducer.
> >>
> >> Is it that the value is not always random? or that it is always random,
> >> but only sometimes falls outside the acceptable range?
> >>
> >> > It suffises to have a producer and consumer and trying to connect many times until this error occurs.If you want, I can try to have a program which will loop indefinitely with a consumer and a producer connecting until I have the error and I can share that code with you.
> >> > This is the code where we set the timeout to 5000 for example:
> >> > proton::connection conn = e.container().connect(url, proton::connection_options().idle_timeout(timeout));conn.open_receiver(url.path());
> >>
> >> I tried modifying one of the cpp examples to set a timeout, and it is
> >> always set as I request, never random.
> >>
> >> Is it possible that your 'timeout' variable above is somehow not always
> >> being initialised correctly?
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
> >> For additional commands, e-mail: users-help@qpid.apache.org
> >>
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
> For additional commands, e-mail: users-help@qpid.apache.org
> 
 		 	   		  

Re: [Proton-c] Random value of idle timeout causing error when below 1000

Posted by Robbie Gemmell <ro...@gmail.com>.
The message is coming from the java broker, which is enforcing a
minimum value for peers to set request for idle_timeout, and
indicating the client requested a value below that. As Gordon says, it
sounds like something might not be getting initialised properly. If
you can check that and rule it out, then after that its possibly worth
turning on protocol trace logging (or using wireshark) and checking
what is actually being sent.

Robbie

On 26 May 2016 at 17:29, Adel Boutros <ad...@live.com> wrote:
>
>
>
> Hello Gordon,
> When the error occurs, the displayed value of idle_time is always random (2, 5, 997, 667, etc.). However when the error doesn't occur, I don't know what the value is. If you want I can log the value everytime. Could you point me to where this error message is coming because I cannot find it in the code? (I searched for "The minimum supported timeout is" but found nothing)
> The value is passed from Java using JNI calls but it is a constant. I doubt Java would be changing the value.
> Regards,Adel
>
>> Subject: Re: [Proton-c] Random value of idle timeout causing error when below 1000
>> To: users@qpid.apache.org
>> From: gsim@redhat.com
>> Date: Thu, 26 May 2016 16:57:33 +0100
>>
>> On 26/05/16 09:19, Adel Boutros wrote:
>> > Hello Gordon,
>> > We are using proton 0.12.0 c++ binding API (proton::handler).
>> > We are connecting to a Qpid Java Broker (6.0.0).
>> > We tried to fix the issue by adding a timeout of a big value but it don't seem to affect the behavior.
>> > Unfortunately, as this bug is random, I don't have a reproducer.
>>
>> Is it that the value is not always random? or that it is always random,
>> but only sometimes falls outside the acceptable range?
>>
>> > It suffises to have a producer and consumer and trying to connect many times until this error occurs.If you want, I can try to have a program which will loop indefinitely with a consumer and a producer connecting until I have the error and I can share that code with you.
>> > This is the code where we set the timeout to 5000 for example:
>> > proton::connection conn = e.container().connect(url, proton::connection_options().idle_timeout(timeout));conn.open_receiver(url.path());
>>
>> I tried modifying one of the cpp examples to set a timeout, and it is
>> always set as I request, never random.
>>
>> Is it possible that your 'timeout' variable above is somehow not always
>> being initialised correctly?
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
>> For additional commands, e-mail: users-help@qpid.apache.org
>>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Re: [Proton-c] Random value of idle timeout causing error when below 1000

Posted by Gordon Sim <gs...@redhat.com>.
On 26/05/16 17:29, Adel Boutros wrote:
>
>
>
> Hello Gordon,
> When the error occurs, the displayed value of idle_time is always random (2, 5, 997, 667, etc.). However when the error doesn't occur, I don't know what the value is. If you want I can log the value everytime. Could you point me to where this error message is coming because I cannot find it in the code? (I searched for "The minimum supported timeout is" but found nothing)
> The value is passed from Java using JNI calls but it is a constant. I doubt Java would be changing the value.

I would check that. As I say I tried an example setting the idle-timeout 
and verified that there were no random fluctuations. It sounds very much 
like an uninitialised variable somewhere. I'd make sure you are always 
setting the value you expect.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


RE: [Proton-c] Random value of idle timeout causing error when below 1000

Posted by Adel Boutros <ad...@live.com>.


Hello Gordon,
When the error occurs, the displayed value of idle_time is always random (2, 5, 997, 667, etc.). However when the error doesn't occur, I don't know what the value is. If you want I can log the value everytime. Could you point me to where this error message is coming because I cannot find it in the code? (I searched for "The minimum supported timeout is" but found nothing)
The value is passed from Java using JNI calls but it is a constant. I doubt Java would be changing the value.
Regards,Adel

> Subject: Re: [Proton-c] Random value of idle timeout causing error when below 1000
> To: users@qpid.apache.org
> From: gsim@redhat.com
> Date: Thu, 26 May 2016 16:57:33 +0100
> 
> On 26/05/16 09:19, Adel Boutros wrote:
> > Hello Gordon,
> > We are using proton 0.12.0 c++ binding API (proton::handler).
> > We are connecting to a Qpid Java Broker (6.0.0).
> > We tried to fix the issue by adding a timeout of a big value but it don't seem to affect the behavior.
> > Unfortunately, as this bug is random, I don't have a reproducer.
> 
> Is it that the value is not always random? or that it is always random, 
> but only sometimes falls outside the acceptable range?
> 
> > It suffises to have a producer and consumer and trying to connect many times until this error occurs.If you want, I can try to have a program which will loop indefinitely with a consumer and a producer connecting until I have the error and I can share that code with you.
> > This is the code where we set the timeout to 5000 for example:
> > proton::connection conn = e.container().connect(url, proton::connection_options().idle_timeout(timeout));conn.open_receiver(url.path());
> 
> I tried modifying one of the cpp examples to set a timeout, and it is 
> always set as I request, never random.
> 
> Is it possible that your 'timeout' variable above is somehow not always 
> being initialised correctly?
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
> For additional commands, e-mail: users-help@qpid.apache.org
> 

 		 	   		  

Re: [Proton-c] Random value of idle timeout causing error when below 1000

Posted by Gordon Sim <gs...@redhat.com>.
On 26/05/16 09:19, Adel Boutros wrote:
> Hello Gordon,
> We are using proton 0.12.0 c++ binding API (proton::handler).
> We are connecting to a Qpid Java Broker (6.0.0).
> We tried to fix the issue by adding a timeout of a big value but it don't seem to affect the behavior.
> Unfortunately, as this bug is random, I don't have a reproducer.

Is it that the value is not always random? or that it is always random, 
but only sometimes falls outside the acceptable range?

> It suffises to have a producer and consumer and trying to connect many times until this error occurs.If you want, I can try to have a program which will loop indefinitely with a consumer and a producer connecting until I have the error and I can share that code with you.
> This is the code where we set the timeout to 5000 for example:
> proton::connection conn = e.container().connect(url, proton::connection_options().idle_timeout(timeout));conn.open_receiver(url.path());

I tried modifying one of the cpp examples to set a timeout, and it is 
always set as I request, never random.

Is it possible that your 'timeout' variable above is somehow not always 
being initialised correctly?


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


RE: [Proton-c] Random value of idle timeout causing error when below 1000

Posted by Adel Boutros <ad...@live.com>.
Hello Gordon,
We are using proton 0.12.0 c++ binding API (proton::handler).
We are connecting to a Qpid Java Broker (6.0.0).
We tried to fix the issue by adding a timeout of a big value but it don't seem to affect the behavior.
Unfortunately, as this bug is random, I don't have a reproducer. It suffises to have a producer and consumer and trying to connect many times until this error occurs.If you want, I can try to have a program which will loop indefinitely with a consumer and a producer connecting until I have the error and I can share that code with you.
This is the code where we set the timeout to 5000 for example:
proton::connection conn = e.container().connect(url, proton::connection_options().idle_timeout(timeout));conn.open_receiver(url.path());
Regards,Adel

> Subject: Re: [Proton-c] Random value of idle timeout causing error when below 1000
> To: users@qpid.apache.org
> From: gsim@redhat.com
> Date: Wed, 25 May 2016 09:55:08 +0100
> 
> On 25/05/16 09:25, Adel Boutros wrote:
> > Hello,
> >  From time to time, we have this annoying random bug when using proton-c client:
> > Error: amqp:connection:forced: Requested idle timeout of 776 is too low. The minimum supported timeout is1000.
> > The value of the timeout is random: sometimes it is as low as "2" and sometimes as high as "998". Re-launching the test makes it pass.
> > Do you know what could be the cause of such error?
> 
> What api are you using? And what are you connecting to? Is your program 
> setting the idle timeout itself? Do you have a reproducer you could share?
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
> For additional commands, e-mail: users-help@qpid.apache.org
> 
 		 	   		  

Re: [Proton-c] Random value of idle timeout causing error when below 1000

Posted by Gordon Sim <gs...@redhat.com>.
On 25/05/16 09:25, Adel Boutros wrote:
> Hello,
>  From time to time, we have this annoying random bug when using proton-c client:
> Error: amqp:connection:forced: Requested idle timeout of 776 is too low. The minimum supported timeout is1000.
> The value of the timeout is random: sometimes it is as low as "2" and sometimes as high as "998". Re-launching the test makes it pass.
> Do you know what could be the cause of such error?

What api are you using? And what are you connecting to? Is your program 
setting the idle timeout itself? Do you have a reproducer you could share?


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org