5

I'm using jenkins slave in AWS ECS cluster, everytimes when I press build, slave container take 3mins to start, how can I speed up this?

Tien Dung Tran
  • 1,127
  • 4
  • 16
  • 32
  • I am not having a 3 minute startup but more like 30 seconds, which I think is too slow. I want to actually just have one running, pre-warmed. – Elijah Lynn Feb 21 '19 at 21:35
  • May I know which Jenkins and ecs plugin version are you using? I still cannot solve the problem – Tien Dung Tran Feb 22 '19 at 06:56
  • Sure, Jenkins ver. 2.138.3 + https://plugins.jenkins.io/amazon-ecs 1.18. – Elijah Lynn Feb 22 '19 at 07:09
  • Hi @ElijahLynn, do you set a fix vaule for Soft memory reservation, Hard memory, CPU unit in ECS cloud confiugration ? – Tien Dung Tran Mar 01 '19 at 03:48
  • Soft Memory = 0, Hard Memory 2048, CPU Units = 1000. All settings https://imgur.com/a/2Q0CzZM – Elijah Lynn Mar 01 '19 at 19:15
  • How fast do your containers start with regular `docker-compose`? – Elijah Lynn Mar 01 '19 at 19:16
  • Set value for Hard Memory made a magic, the container start up around 10s. But I have another problem, some build job seen require memory more than Hard Memory reservation. Even I set 4096 for Hard Memory, I still got error: The forked VM terminated without properly saying goodbye. VM crash or System.exit called – Tien Dung Tran Mar 04 '19 at 04:47
  • Do you get any cluster logs on the ECS side? – Elijah Lynn Mar 05 '19 at 01:40
  • I see some scary log messages in Jenkins when the ECS side terminates, but usually everything is fine on ECS side and it is just that the Jenkins log message doesn't know how to handle that termination and throws an exception or something along those lines. I haven't actually looked that closely at them. If it worked you would see something under the "stopped" section of the tasks. Then expand that task and look at the logs. If you don't see a task under "stopped" then it never got that far. – Elijah Lynn Mar 05 '19 at 02:21
  • Good to hear you get 10 seconds, I am guessing our containers are just way too bloated. Time to "FROM alpine", lol. – Elijah Lynn Mar 05 '19 at 02:22

0 Answers0