Why is my CodeBuild taking so long to start after optimizing my pipelines?

0
7
Asked By WanderingDolphin42 On

I've spent two weeks optimizing my CI/CD CodePipeline and have made significant improvements. Initially, my build times dropped from about 7-10 minutes down to 1-2 minutes. But now, I'm facing a frustrating issue where the CodeBuild containers take at least 5 minutes to provision before anything even starts running. I'm working with an nx monorepo and utilizing the nx build cache system with S3 as the backend, alongside the native S3 cache for CodeBuild jobs and ECR container caching. Despite my optimizations, I'm seeing build times extend again to 7-13 minutes. What might be causing this delay?

3 Answers

Answered By TechieTim123 On

I’m curious about the instance types you’re using for your runners. Sometimes the delays come from waiting for the instance to provision. If you’re on BUILD_GENERAL1_MEDIUM, it might be worth checking if that’s still adequate for your needs.

Answered By CacheWhisperer On

Have you considered that your cache might be getting too large? CodeBuild handles the cache as one big blob when moving it in and out of S3, which can slow things down. In my experience, caching npm packages can often take longer than just installing directly from npm, especially if your cache isn’t really speeding things up.

Answered By CuriousCat99 On

It sounds like CodeBuild can be pretty slow to provision sometimes, that’s just the nature of it. Not much else to say there really. Maybe the instance type you’re using could be affecting the performance too? What are you currently running?

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.