You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

GitLab配置parallel:matrix后作业无法并发执行问题排查

GitLab CI parallel:matrix 作业串行执行故障排查

环境与配置说明

  • 实现目标:在GitLab CI中配置作业并行执行
  • Runner部署:单台服务器上已注册8个GitLab Runner,全局配置文件路径为/etc/gitlab-runner/config.toml,文件内已设置全局参数concurrent = 16,可查询到全部8个Runner的完整配置,配置文件开头内容如下:
concurrent = 16
check_interval = 0

[session_server]
  session_timeout = 1800

[[runners]]
  name = "gitlab-runner-02-#1"
  url = "http://gitlab.example.com"
  token = "redacted"
  executor = "docker"
  [runners.custom_build_dir]
  [runners.cache]
    [runners.cache.s3]
    [runners.cache.gcs]
    [runners.cache.azure]
  [runners.docker]
    tls_verify = false
    image = "almalinux:latest"
    privileged = false
    disable_entrypoint_overwrite = false
    oom_kill_disable = false
    disable_cache = false
    volumes = ["/cache"]
    shm_size = 0

[[runners]]
  name = "gitlab-runner-02-#2"
  url = "http://gitlab.example.com"
  token = "redacted"
  executor = "docker"
  [runners.custom_build_dir]
  [runners.cache]
    [runners.cache.s3]
    [runners.cache.gcs]
    [runners.cache.azure]
  [runners.docker]
    tls_verify = false
    image = "almalinux:latest"
    privileged = false
    disable_entrypoint_overwrite = false
    oom_kill_disable = false
    disable_cache = false
    volumes = ["/cache"]
    shm_size = 0
  • 项目侧CI配置文件.gitlab-ci.yml内容如下:
image: almalinux:latest

stages:
  - build

foo:
  stage: build
  script: sleep 60
  parallel:
    matrix:
      - foo: [a, b, c, d, e, f, g, h]

故障现象

对照GitLab官方文档与社区实践案例,上述配置本应支持parallel:matrix生成的8个子作业并行运行,但实际运行时所有子作业全部按顺序串行执行,未达到并行预期。

初步排查结论

经初步验证,故障诱因与另一台服务器上注册的Runner默认配置有关:该Runner默认不支持同时运行多个作业。排查过程中同步调高了所有独立Runner的单实例并发作业限制,后续将完成全量测试,确认最终生效的修复项。


内容的提问来源于stack exchange,提问作者rocky

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.27 16:45:43