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

Memory leak in the cloud output #1187

Closed
na-- opened this issue Oct 7, 2019 · 0 comments · Fixed by #1188
Closed

Memory leak in the cloud output #1187

na-- opened this issue Oct 7, 2019 · 0 comments · Fixed by #1188
Assignees
Milestone

Comments

@na--
Copy link
Member

na-- commented Oct 7, 2019

#1130 caused a regression - when the Load Impact cloud sends this the limit reached error, k6 would stop sending metrics to the cloud, but it would still continue to accept them in Collect() and store them in the buffer slices, thus rapidly exploding the memory usage.

@na-- na-- added this to the v0.26.0 milestone Oct 7, 2019
@cuonglm cuonglm self-assigned this Oct 7, 2019
cuonglm added a commit that referenced this issue Oct 7, 2019
In #1130, we stop sending metrics to cloud when limit reached. However,
after stop sending metrics, collector still collects data, causing the
memory usage quickly increase.

To fix it, do not collect data if stop sending metrics triggered.

While at it, also remove some useless condition checking that slice
length is greater than 0 before looping.

Fixes #1187
cuonglm added a commit that referenced this issue Oct 7, 2019
* fix memory leak after stop sending metrics to cloud

In #1130, we stop sending metrics to cloud when limit reached. However,
after stop sending metrics, collector still collects data, causing the
memory usage quickly increase.

To fix it, do not collect data if stop sending metrics triggered.

While at it, also remove some useless condition checking that slice
length is greater than 0 before looping.

Fixes #1187
cuonglm added a commit that referenced this issue Oct 15, 2019
* fix memory leak after stop sending metrics to cloud

In #1130, we stop sending metrics to cloud when limit reached. However,
after stop sending metrics, collector still collects data, causing the
memory usage quickly increase.

To fix it, do not collect data if stop sending metrics triggered.

While at it, also remove some useless condition checking that slice
length is greater than 0 before looping.

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

Successfully merging a pull request may close this issue.

2 participants