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.

Worker thinks that it is at max capacity when jobBatchMinSize == maxJobsToActivate

See original GitHub issue

When jobBatchMinSize is the same number as maxJobsToActivate, I get the following messages in the logs

11:20:11.050 | zeebe |  [test (batch)] INFO: Worker at max capacity - test has 0, a capacity of 5, and a minimum job batch size of 5.
11:20:11.351 | zeebe |  [test (batch)] INFO: Worker at max capacity - test has 0, a capacity of 5, and a minimum job batch size of 5.

I believe this is due to the isOverCapacity check found in https://github.com/camunda-community-hub/zeebe-client-node-js/blob/953a93894406d6e55cdfcc1e6289599644f77831/src/lib/ZBWorkerBase.ts#L378

Expected Behavior

Worker should work on jobs and not be over capacity.

Current Behavior

Worker thinks that it is over capacity.

Possible Solution

Will probably need to have an additional check to see if those 2 values are the same.

Steps to Reproduce

  1. set jobBatchMinSize and maxJobsToActivate to be the same value > 0
  2. run a worker and view log messages saying that it is at max capacity

Context (Environment)

I can’t set the number to be the same for both values. I have to make sure that jobBatchMinSize is less than maxJobsToActivate

Detailed Description

Possible Implementation

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
jwulfcommented, Nov 4, 2021

I don’t make changes to the 0.26 client anymore, so this will have to stay as it is. Thanks for taking a look at it, and I apologise for not picking the version up at the outset!

1reaction
younes-iocommented, Oct 16, 2021

is someone treating this issue or can I take it?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Would like to handle jobs in batch · Issue #134 - GitHub
Enough jobs are available to the worker to satisfy the minimum job batch size;; The batch has been building for the maximum amount...
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