Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bower install slow when running from teamcity

I have a number of client side packages managed by bower. When we deploy our application (through teamcity) we do a bower install to get the latest version of each package and then copy this to our server.

When I run this from my local machine bower install takes 10-20s. When I run it as a build step in teamcity (note command line build step with custom script containing "bower install") it takes 4 minutes. If I remote desktop onto that machine and run bower install from the command line it takes 10-20s.

Has anyone got any thoughts what's going on?

Edit

If I look at ProcExp on the server it seems ssh.exe is hanging for a long time before finishing executing.

Some extra details:

  • TeamCity Enterprise 7.1.4 (build 24331); Agent Version: 24331
  • Windows Server 2008 R2
  • Agent running as admin account
  • Git v1.8
  • Build step is custom script; node node_modules/bower/bin/bower install
  • Tried with both teamcity.git.use.native.ssh=false & teamcity.git.use.native.ssh=true
  • Using private keys in /.ssh

I found this issue on Teamcity's Youtrack which seems to be the same/similar issue but has since been closed. Not certain if its related or not. I've also raised a new issue but no response

like image 976
James Hollingworth Avatar asked Jan 16 '13 16:01

James Hollingworth


2 Answers

We discovered that Git for windows installs an old version of SSH, if you upgrade to the latest version of SSH it will fix the slowness http://darrell.mozingo.net/2011/09/29/painfully-slow-clone-speeds-with-msysgit-gitextensions/

like image 130
James Hollingworth Avatar answered Oct 07 '22 18:10

James Hollingworth


Take a look at team city's detailed log. You will see whether it's git or bower that are getting bad performance or network throughput. If it's git, you may want to see if you can add the depth option to be one and specify the branch so it doesn't copy your history if it's large.

like image 38
Adam Dymitruk Avatar answered Oct 07 '22 18:10

Adam Dymitruk