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

add a configuration option for specifying a worker heartbeat interval #1988

Closed
wants to merge 1 commit into from
Closed

add a configuration option for specifying a worker heartbeat interval #1988

wants to merge 1 commit into from

Conversation

bioker
Copy link

@bioker bioker commented Jan 28, 2022

No description provided.

@bioker
Copy link
Author

bioker commented Jan 28, 2022

I have noticed that there is no option to configure this parameter.

I have faced a situation when the heartbeat fails but workers seem to be healthy while doing this lab project: https://github.com/bioker/mysql-lab/blob/f85ea857d0c4b29261569eadcca6b5344ac7eed1/docker-compose.yaml#L4.

Running the project with the custom docker image I build from my version shows that the increased heartbeat interval helps to avoid such problems and the test still works well.

Maybe it's worth checking why it fails in the first place, but it seems harder than adding this parameter and I suppose it can be useful in some flaky environments anyway so here is the PR.
I hope you will find it useful too.

Also seems to be related to the following issues:
#1787
#1843

@bioker
Copy link
Author

bioker commented Jan 28, 2022

Ah, have followed the issue history and noticed this feature request so linking it also:
#1897

@bioker
Copy link
Author

bioker commented Jan 28, 2022

This change represents how I have used the updated version: https://github.com/bioker/mysql-lab/commit/eedbb5a31f717acbc128ebf4ba3a05fe88d01458

@cyberw
Copy link
Collaborator

cyberw commented Jan 28, 2022

Hmm... those values are already customizable in the locustfile, and I'm not sure they are worthy of a command line setting.

from locust import runners
runners.HEARTBEAT_INTERVAL = 2

@bioker
Copy link
Author

bioker commented Jan 28, 2022

Ok, I see, thanks for the example

@bioker bioker closed this Jan 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants