Github user rickysaltzer commented on the pull request:
https://github.com/apache/nifi/pull/91#issuecomment-153848048
Thanks for all of the comments, I'll address them as soon as I get a
chance. As @apiri pointed out, If the connection fails, then we need to call
`client.close()` (if not null) in order for the Riemann library to clean up its
netty threads. Otherwise, it endlessly spawns threads which eventually causes
the OOM exception.
I don't particularly like the way I'm backing off when failing to connect,
as it seems to retry very quickly. This is why the OOM surfaces minutes after
killing Riemann. What is the best practice here for yielding for a longer
period of time?
catch (IOException e) {
if (client != null) {
client.close();
}
context.yield();
throw new ProcessException(String.format("Unable to connect to
Riemann [%s:%d] (%s)\n%s", host, port, transport, e.getMessage()));
}
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---