RpcProxy Timeout

Hello,

Is there a way to set a timeout on a RpcProxy call? I'd like to send a
sentry error if a timeout happens, as well as cancel the request so it is
not processed when the service comes back online.

Regards,
Conor

Hi Conor,

There's no timeout built in to the proxy, but you can always use
[eventlet.timeout] [1]

Due to the way rpc calls are implemented with messages are implemented,
there's no way to "cancel" a call. One option is to add a "ttl" header,
after which the messages can be discarded when picked up, before
processing. There is also a rabbitmq ttl extension that might be an option.
However, neither are currently implemented in nameko

Best,
David

[1] http://eventlet.net/doc/modules/timeout.html

···

On Thursday, 11 February 2016 14:41:50 UTC, conor.s...@gmail.com wrote:

Hello,

Is there a way to set a timeout on a RpcProxy call? I'd like to send a
sentry error if a timeout happens, as well as cancel the request so it is
not processed when the service comes back online.

Regards,
Conor

Thanks for the info David!

···

On Thursday, February 11, 2016 at 10:19:35 AM UTC-5, David Szotten wrote:

Hi Conor,

There's no timeout built in to the proxy, but you can always use
[eventlet.timeout] [1]

Due to the way rpc calls are implemented with messages are implemented,
there's no way to "cancel" a call. One option is to add a "ttl" header,
after which the messages can be discarded when picked up, before
processing. There is also a rabbitmq ttl extension that might be an option.
However, neither are currently implemented in nameko

Best,
David

[1] http://eventlet.net/doc/modules/timeout.html

On Thursday, 11 February 2016 14:41:50 UTC, conor.s...@gmail.com wrote:

Hello,

Is there a way to set a timeout on a RpcProxy call? I'd like to send a
sentry error if a timeout happens, as well as cancel the request so it is
not processed when the service comes back online.

Regards,
Conor

I wanted to follow up on this thread. Conor, did you find a reliable way to
do timeouts with RpcProxy calls?

How do other people handle issues where services go offline and then
RpcProxy calls to them just hang?

···

On Thursday, February 11, 2016 at 8:05:46 AM UTC-8, Conor Seabrook wrote:

Thanks for the info David!

On Thursday, February 11, 2016 at 10:19:35 AM UTC-5, David Szotten wrote:

Hi Conor,

There's no timeout built in to the proxy, but you can always use
[eventlet.timeout] [1]

Due to the way rpc calls are implemented with messages are implemented,
there's no way to "cancel" a call. One option is to add a "ttl" header,
after which the messages can be discarded when picked up, before
processing. There is also a rabbitmq ttl extension that might be an option.
However, neither are currently implemented in nameko

Best,
David

[1] http://eventlet.net/doc/modules/timeout.html

On Thursday, 11 February 2016 14:41:50 UTC, conor.s...@gmail.com wrote:

Hello,

Is there a way to set a timeout on a RpcProxy call? I'd like to send a
sentry error if a timeout happens, as well as cancel the request so it is
not processed when the service comes back online.

Regards,
Conor

Just to explore the possibility of this, I opened up a PR on nameko here
<https://github.com/onefinestay/nameko/pull/360/files> that adds timeouts
to RpcProxy using eventlet.timeout and the x-message-ttl header. Would love
any and all feedback!

···

On Wednesday, September 14, 2016 at 10:58:19 AM UTC-7, Jesse Pollak wrote:

I wanted to follow up on this thread. Conor, did you find a reliable way
to do timeouts with RpcProxy calls?

How do other people handle issues where services go offline and then
RpcProxy calls to them just hang?

On Thursday, February 11, 2016 at 8:05:46 AM UTC-8, Conor Seabrook wrote:

Thanks for the info David!

On Thursday, February 11, 2016 at 10:19:35 AM UTC-5, David Szotten wrote:

Hi Conor,

There's no timeout built in to the proxy, but you can always use
[eventlet.timeout] [1]

Due to the way rpc calls are implemented with messages are implemented,
there's no way to "cancel" a call. One option is to add a "ttl" header,
after which the messages can be discarded when picked up, before
processing. There is also a rabbitmq ttl extension that might be an option.
However, neither are currently implemented in nameko

Best,
David

[1] http://eventlet.net/doc/modules/timeout.html

On Thursday, 11 February 2016 14:41:50 UTC, conor.s...@gmail.com wrote:

Hello,

Is there a way to set a timeout on a RpcProxy call? I'd like to send a
sentry error if a timeout happens, as well as cancel the request so it is
not processed when the service comes back online.

Regards,
Conor

We ended up creating a monitoring dependency which keeps an eye on worker
execution times. Not a timeout, but this way we are notified when rpc calls
are hanging.

···

On Wednesday, September 14, 2016 at 1:58:19 PM UTC-4, Jesse Pollak wrote:

I wanted to follow up on this thread. Conor, did you find a reliable way
to do timeouts with RpcProxy calls?

How do other people handle issues where services go offline and then
RpcProxy calls to them just hang?

On Thursday, February 11, 2016 at 8:05:46 AM UTC-8, Conor Seabrook wrote:

Thanks for the info David!

On Thursday, February 11, 2016 at 10:19:35 AM UTC-5, David Szotten wrote:

Hi Conor,

There's no timeout built in to the proxy, but you can always use
[eventlet.timeout] [1]

Due to the way rpc calls are implemented with messages are implemented,
there's no way to "cancel" a call. One option is to add a "ttl" header,
after which the messages can be discarded when picked up, before
processing. There is also a rabbitmq ttl extension that might be an option.
However, neither are currently implemented in nameko

Best,
David

[1] http://eventlet.net/doc/modules/timeout.html

On Thursday, 11 February 2016 14:41:50 UTC, conor.s...@gmail.com wrote:

Hello,

Is there a way to set a timeout on a RpcProxy call? I'd like to send a
sentry error if a timeout happens, as well as cancel the request so it is
not processed when the service comes back online.

Regards,
Conor