We're using both TeamCity and Gerrit. For some connections to Gerrit TeamCity does not close the connection. This does not happen all the time, but frequently enough to cause problems. After a couple days the max allowed concurrent connections of 64 is reached and teamcity is no longer able to connect at all.
We've enabled a timeOut in TeamCity of one minute after which the build is marked as failed and the connection should be closed.
I've tried to close the connections manually using 'ssh -p 29418 $GIT_HOST gerrit close-connection $ID' but this did not work. Also setting the sshd.timeOut did not make any difference.
Is there another way to forcibly close connections and what could explain the issue of not closing the connection the first place?
Note that we use other tools like Jenkins as well. There is a continuous flow of connections all the time and we only have issues with TeamCity when it comes to closing the connection.