Re-open connection on transmission failures #23
Merged
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 file descriptor exhaustion issue appeared to be caused by the producer failing when transmitting, and then not attempting to reconnect. Consequently, another subscription to the commit log was made and failed rapidly, and didn't provide enough time for the last one to clean up its resources. This rapid failure loop was not recovering either and so eventually all file descriptors could be used up (particularly if there's already a lack of them due to sbt etc).
Another, albeit separate error, was that a pending handler failure wouldn't cause a new source to be made. This was an oversight.
I am no longer able to see the file descriptor exhaustion after many connects/re-starts of the JVM service having posted UDP observations.
Finally, a separate commit makes some tidy-ups.
Fixes #20