Open vrtareg opened 8 years ago
That could be possible, the connection is designed to try to keep the stream flowing as uninterrupted as possible. So if it looses connection somehow it tries to reconnect. If something lingers on on either end it would build up.
Any way to prevent this and close unused connections?
You would need to find it first :) then it would hopefully be pretty obvious how to fix the leak if you find where it is.
Any recommendations what to monitor and where to put debug output? I will be glad to do if I know how.
The connect logic is the last line of the stack trace you provided. The main loop is here https://github.com/sonyxperiadev/gerrit-events/blob/master/src/main/java/com/sonymobile/tools/gerrit/gerritevents/GerritConnection.java#L314
So something is going wrong and new connection is created without closing current one. This is really killing as Gerrit servers has a limit on incoming connections from clients and on a next round it just denies new connection. Only way to fix this is to restart Jira instance ...
Which is strange because if a connection fails to be established there shouldn't be any connection available to close.
Hi Team
We are using this library in one of the Jira PlugIns to connect to the Gerrit server to gather the reviwes information.
It looks like that in our environment library leaves some unclosed leftover connections which then affecting PlugIn functionality as server denies connection because of conn limit from Gerrit server side.
Is it possible that somewhere exception is not catched and connection left open?
Regards, Areg