-
Notifications
You must be signed in to change notification settings - Fork 91
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
Increased connections to the in_forward plugin server #11
Comments
Hi @shinji62, Thank you for your reporting and investigating. I talk about it with other collaborators. So, please wait. Thanks, |
Thanks for the report. We want to reproduce the connection leak. Could you let me know the followings?
|
We wrap the FluentLogger in a logback appender like the following: doAppend(stuffToLog) {
FluentLogger logger = FluentLogger.getLogger("sametag", "samehost", "sameport")
logger.log(stuffToLog)
} So getLogger gets called everytime with the same arguments on each log call. In our runs, we see an increased connections in CONNECTION_ESTABLISHED state. |
I couldn't reproduce this connection leak issue with logback AppenderBase class and concurrently making alot of GC. Regarding the code, FluentLogger calls RawSocketSender#close() in its finalize(). So it looks that FluentLogger closes the TCP connection even if it's released from the WeakHashMap. One question. Did you use the logger in multi-threaded environment? Also, can you create minimal code which can reproduce this issue? If you can, it's very helpful for fixing the issue. Thanks |
I know it has some time, but maybe it can help others.
|
Hi
We are sending logs from the client to the in_forward input plugin. In
production we the number of connections to the in_forward port increases over
time. This results in huge memory usage on our applications.
In my initial investigation, we think that when keys get expired in [1], the
sender instance on that key doesn't close properly. So when the [2] tried to
recreate the key [2], another connection will be made. Is this a correct
interpretation on what's happening?
[1] https://github.com/fluent/fluent-logger-java/blob/master/src/main/java/org/fluentd/logger/FluentLoggerFactory.java#L36
[2] https://github.com/fluent/fluent-logger-java/blob/master/src/main/java/org/fluentd/logger/FluentLoggerFactory.java#L56
The text was updated successfully, but these errors were encountered: