Blossom Logo Blossom

Build Timeouts

2 min read

Blossom enforces a 15-minute timeout limit for build jobs, similar to Heroku’s slug compilation timeout. This limit helps ensure:

  • Reasonable deployment times
  • Efficient resource utilization
  • Better developer experience with faster feedback loops

Handling Longer Builds

If your builds are approaching or exceeding the 15-minute limit, here are some strategies to optimize your build process:

  1. Use Pre-built Docker Images

    • Start with a base image that includes your common dependencies
    • Push these base images to a registry
    • Use them as your starting point in your Dockerfile
    • This reduces build time by avoiding repetitive dependency installation
  2. Optimize Build Resources

    • Use a dedicated build server with more CPU cores
    • More CPU power can significantly reduce build times
    • Consider using build servers with 4+ CPU cores for complex builds
  3. Optimize Your Dockerfile

    • Use multi-stage builds to reduce final image size
    • Leverage Docker layer caching effectively
    • Only copy necessary files
    • Combine RUN commands to reduce layers

Why 15 Minutes?

The 15-minute timeout is based on industry standards and practical considerations:

  • Matches Heroku’s slug compilation timeout
  • Encourages build optimization and good practices
  • Helps maintain reasonable deployment cycles

Builds taking longer than 15 minutes often indicate opportunities for optimization. Long build times can impact:

  • Developer productivity
  • Deployment frequency
  • Resource utilization
  • Overall development workflow