This repository was archived by the owner on Jan 23, 2020. It is now read-only.
Stop statsd client after sending data#73
Merged
Conversation
The current implementation creates a new DescriptorImpl instance for every call to onCompleted. For every new instance a new statsd client is created. The statsd client is never stopped. This causes a resource(thread) leak. The resource leak will cause a `java.lang.OutOfMemoryError: Unable to create new native thread` How fast this happens depends on how often jobs are executed and the OS https://plumbr.eu/outofmemoryerror/unable-to-create-new-native-thread#example This PR stops the statsd client after it sent the data. A better fix would be to implement DescriptorImpl as a real singleton
|
:+1 being hit by this, makes the plugin unusable |
|
Same :( -- @JohnLZeller do you have any idea when this could be merged and/or if there is more we should do here? |
|
Bump! |
|
@jshirley Thank you for following up. We are moving closer to a release, as we have several PRs open. Let me circle up with @JohnLZeller and see if we can offer a specific timeline. |
Contributor
|
Thanks for your contribution @suxor42! This looks good as is. It'll be in the next release |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The current implementation creates a new DescriptorImpl instance for every call
to onCompleted. For every new instance a new statsd client is created.
The statsd client is never stopped. This causes a resource(thread) leak.
The resource leak will cause a
java.lang.OutOfMemoryError: Unable to create new native threadHow fast this happens depends on how often jobs are executed and the OS
https://plumbr.eu/outofmemoryerror/unable-to-create-new-native-thread#example
This PR stops the statsd client after it sent the data. A better fix would be to implement
DescriptorImpl as a real singleton