Intermittent issues are every developer’s best friend. Recently we started hitting an error during the npm install
phase of our CI and CD jenkins jobs. Here’s the error:
In our particular use case, we’d just passed the threshold of having more than 10 internally sourced NPM dependencies,
being sourced by tag directly from our GitLab server.
The solution is updating quite a simple SSH setting; MaxStartups. Here’s the man page entry from sshd_config.
Specifies the maximum number of concurrent unauthenticated
connections to the SSH daemon. Additional connections will be
dropped until authentication succeeds or the LoginGraceTime
expires for a connection. The default is 10.
Yes - sshd will throttle your concurrent connections while they authenticate. Increasing MaxStartups caused our npm
installation woes to disappear from our CI environment. Huzzah!