Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible issue with default number of workers on "thruk bp" #1298

Open
bradymd opened this issue Jul 25, 2023 · 3 comments
Open

Possible issue with default number of workers on "thruk bp" #1298

bradymd opened this issue Jul 25, 2023 · 3 comments
Labels

Comments

@bradymd
Copy link

bradymd commented Jul 25, 2023

Describe the bug
I have a centralised thruk depending on 4 backends.
I have just about 20 Business Processes. I'm using this for the first time recently so could well have fouled up here.

The cron job:

          • cd /usr/share/thruk && /bin/bash -l -c '/usr/bin/thruk bp all' >/dev/null 2>>/var/lib/thruk/cron.log

Will fail unless I use "thruk bp all -w 1" so one worker.

So I have upped the number of CPU's thinking this would fix it. I now have 4 vcpu's from 2 vcpu's and its still the same.

Here is part of the output.

Use of uninitialized value in list assignment at /usr/share/thruk/lib/Thruk/Base.pm line 270.
Use of uninitialized value in list assignment at /usr/share/thruk/lib/Thruk/Base.pm line 270.
[ERROR] bp 'Infrastructure SIEM' failed: Can't use string ("0") as a HASH ref while "strict refs" in use at /usr/share/thruk/l
ib/Thruk/Backend/Manager.pm line 2171.
[ERROR] bp 'Infrastructure Load Balancers' failed: Can't use string ("0") as a HASH ref while "strict refs" in use at /usr/sha
re/thruk/lib/Thruk/Backend/Manager.pm line 2171.

It only appeared after about 19 Business Processes so it is to do with the number of objects. But I put 20+ dummy ones on another host and it didn't happen so its something to do with how many objects there are.

I can leave it as 1 worker, I can live with that for sure, but thought I'd pass this on for consideration.

Thruk Version
thruk-3.08.3-35.1.x86_64

To Reproduce
I have tarred up the /etc/thruk/bp/*.tbp file to the backend host which actually has nearly all these checks.
The host with the issue is the central service - so relies on feeds from backends.

When I tar up and check ... it works.

/bin/bash -l -c '/usr/bin/thruk bp all'
OK - 21 business processes updated in 1.32s (15.9/s)

How big are my business processes? I can see 188 labels in the .tbp config files.

grep label *.tbp | wc -l
188

Expected behavior
Well with "-w 1" that looks normal. It's quiet.

/bin/bash -l -c '/usr/bin/thruk bp all -w 1'
OK - 21 business processes updated in 1.32s (15.9/s)

Screenshots
Not necessary really.

Desktop (please complete the following information):
It's not a GUI issue, its a backend issue.

Additional context
Well I offer it for consideration. Thank-you

@sni sni added the Bug label Jul 25, 2023
@sni
Copy link
Owner

sni commented Jul 25, 2023

sounds like a bug, i will have a look. Thanks for sharing.

@sni
Copy link
Owner

sni commented Jul 25, 2023

does running thruk bp all -vvv reveal anything useful? Pinning it on one worker disables a lot of extra code required to parallelize calculation, so i assume something is going wrong there.

@bradymd
Copy link
Author

bradymd commented Jul 25, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants