question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Command Router: endless "Enable Command Routing" loop

See original GitHub issue

We’ve encountered a scenario, where an “Enable Command Routing” invocation in the Command Router (see #2576) resulted in an endless loop, trying to invoke the command consumer registration for a large list of tenants again and again.

The scenario included a few subsequent “Enable Command Routing” requests with a lot of tenants (several hundred entries all in all, also caused by #2704 in connection with already deleted test tenants). This resulted in many “get Tenant” invocations, which eventually led to a org.eclipse.hono.client.ServerErrorException: no credit available for sending request exception. The problem is that this caused the corresponding tenant to be again put into the queue of tenants for which “get Tenant” and “register command consumer” was to be invoked (as part of a retry mechanism). As there is no delay in processing implemented here, the situation could never recover, leading to constant high CPU usage and errors in processing the single incoming “register command consumer” Command Router API requests for yet uncached tenants. Also the Jaeger Agent was put under high load, leading to most of the tracing spans to get dropped. (This made it difficult to analyze the original exception, as there is no log output here).

An indication of the problem in the Jaeger UI was that there was no “re-enable command routing for tenants” entry listed in the operations combo box, as this span never got finished.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:11 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
calohmncommented, Jun 7, 2021

@sophokles73 No, the non-existing tenants result in ClientErrorExceptions, meaning there is no retry for that tenant.

There are 2 problems FMPOV:

  • There is no limit to the retry mechanism, so that any re-occuring 500 or 503 error for example will result in endless retries.
  • There is no delay in the tenants queue processing, meaning that there may be a “no credit available” error if there are lots of (yet uncached) tenants in the queue. And there is no delay in between retries. This would be relevant in case the device registry AMQP connection is temporarily not there for example.
0reactions
calohmncommented, Jun 11, 2021

Yes.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cisco IOS IP Routing: Protocol-Independent Command ...
Defines the conditions for redistributing routes from one routing protocol into another, or enables policy routing. set default interface. Indicates where to ...
Read more >
Create a RIP routing loop and count-to-infinity in Packet Tracer
http://danscourses.com - A demonstration using Packet Tracer, of how to create a routing loop and count-to-infinity scenario in RIP by ...
Read more >
RIP loop prevention - Study CCNP
Routing loops occur when a packet is continually routed through the same routers over and over again, in an endless circle. Because they...
Read more >
How to Troubleshoot Routing Problems - Auvik Networks
On Windows, use the “route print” command. ... There are no infinite loops in IP, but it's still a bad thing because your...
Read more >
Enabling RIP and configuring global parameters
Enter global configuration mode. · To enable RIP globally, enter the router rip command. · (Optional) Change the route loop prevention method.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found