Open ThorbenLindhauer opened 4 years ago
This comment was imported from JIRA and written by user @koevskinikola
Hey @nevries,
Thank you for the report. Is there a stack trace or any logs that you can provide for the error, or the only indicator is the CPU usage?
Best, Nikola
This comment was imported from JIRA and written by user @nevries
Hi @koevskinikola,
sorry, no stack trace, because I stopped investigating after having a look at these lines of code: https://github.com/camunda/camunda-external-task-client-java/blob/11a7fcf44e11375d85759494e20f25641fcff3e0/client/src/main/java/org/camunda/bpm/client/topic/impl/TopicSubscriptionManager.java#L84-L119
For me it was pretty clear that, given subscriptions
being an empty collection, there is an infinite loop. Actually, having a second look, it seems also the case if isBackoffStrategyDisabled
is true. But maybe I was jumping to the conclusions.
What I definitely can tell is: Just observing the CPU load, after passing a code line that does a topic subscription, the CPU usage goes immediately back to normal.
This comment was imported from JIRA and written by user @koevskinikola
Hey @nevries,
I managed to reproduce the issue. At least half of my CPU cores were constantly at 100%. I'll forward the ticket for scheduling.
The load is the same no matter if the Backoff strategy is disabled or enabled.
Best, Nikola
This comment was imported from JIRA and written by user @nevries
{quote}The load is the same no matter if the Backoff strategy is disabled or enabled. {quote} What I meant is: Even if you have at least one subscription, I expect the problem to appear also if backoff strategy is disabled. I did not test that, but if my assumption about the root cause of the problem is correct, it would imply that behavior as well.
This comment was imported from JIRA and written by user @ThorbenLindhauer
Hey Ragnar,
I won't schedule a fix for the time being due to other priorities. Feel free to raise a support case if you need a fix until a certain deadline.
Cheers, Thorben
Hi @ThorbenLindhauer, I would like to work on this issue. Can I pick this up?
@adisin17, feel free to raise a pull request for this and don't forget to add the ticket's number. Code has been moved and now it can be found here: https://github.com/camunda/camunda-bpm-platform/tree/master/clients/java
Sure, I'll start the work. Thanks!
This issue was imported from JIRA:
What are the steps to reproduce your problem?
Just try that:
What is the problem?
CPU usage goes to 100% (for one thread).
What would be the expected behavior:
Keep calm and wait for subscription.
Hints (optional):
This goes wild: camunda-external-task-client-java/client/src/main/java/org/camunda/bpm/client/topic/impl/TopicSubscriptionManager.java
Links: