VCS roots Failed to collect changes

Answered

Hello

we have a build in TeamCity which triggered by schedule trigger 

but we meet "Unable to collect changes" issue random, sometimes it's failed to collect changes

error log:

The build is removed from the queue to be prepared for the start
Failed to collect changes, error: List remote refs failed: com.jcraft.jsch.JSchException: SSH_MSG_DISCONNECT: 12 Too many concurrent connections (12) - max. allowed: 12 , VCS root: "xxx" {instance id=36873, parent internal id=836, parent id=xxx, description: "xxxxxx"}

Do you know what's the problem and how to fix it? 

7 comments
Comment actions Permalink

Hello Tao,

It appears to be a response from the VCS server in use; SSH_MSG_DISCONNECT: 12 states that the number of concurrent connections handled by the server is over the limit (12, as per the server response). Could you please let me know what VCS server do you use? I also anticipate the issue to only affect the VCS roots using SSH connections. 

0
Comment actions Permalink

Also, could you please confirm the version of TeamCity in use? 

0
Comment actions Permalink

Thanks for checking

We use Git as VCS server and our TeamCity version is "TeamCity Enterprise 2020.1.5 (build 78938)"

0
Comment actions Permalink

Hello Tao,

Thank you for the details; could you please confirm the type of VCS server you have (e.g. GitHub/BitBucket/etc., on premises or in cloud)?

0
Comment actions Permalink

Hi, Fedor :

We're using Gerrit which supported by our IT team

please note the issue is random

thanks for your support 

0
Comment actions Permalink

Hello Tao,

Thank you! Gerrit allows to configure maximum number of concurrent SSH sessions that a user account may open at a single time (see the details here - you need the sshd.maxConnectionsPerUser property). I assume that on your instance it will be equal to 12 as per the above error response which would mean that sometimes number of connections is over that limit. You could consider increasing the limit if the SSH identity is the same for multiple VCS roots - TeamCity will open a connection per each root it needs to poll, and if there are many of them, it could reach the limit quickly.

You may also want to check the Gerrit logs (as to find out the origin of connections when the issue happens - perchance the TeamCity is not the only source of those connections). 

0
Comment actions Permalink

Ok, understand, thanks a lot

I will check it according to the clue you provided, thanks 

0

Please sign in to leave a comment.