Skip to content
Advertisement

How to debug which particular Camel Route has a kind of “CPU leak”? Is there a CU metrics per route?

We run a bunch of too different data scraping routes on our Camel instances. And at about 1 week after a start of the Camel run, the CPU resources occupied by the Camel tend to grow and never be released:

enter image description here

As they reach 100%, the throatling starts and we miss the data.

The first and very simple approach is to set up 1 instances, and and keep an only route in 1 instanc to be observed, while the rest would be in another one, until we define which one causing a problem and then to debug some points/beans inside this particular route. But since the degradation takes week, this approach looks very slow.

Is there a kind of CPU-per-route metric that can make us to estimate which route eats up the CPU resources?

UPD: i’m also monitoring the route metrics, but unfortunately metric s per route just gives me timing, hwhich are not diverged and look increasing/go peaking/go oscilating simultaneously.

enter image description here

JavaScript

and

rate(label_replace({__name__=~"camel_proxy.*count"},"name_label","$1","__name__", "(.+)")[5m:])

are plotted to prolt Micrometer metrics like that:

JavaScript

and

JavaScript

Advertisement

Answer

You can user VisualVM (https://visualvm.github.io/) to sample or profile your application, you will find method that consumme CPU.

With camel you can add hawtio (https://hawt.io/), it can help.

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement