Gitlab jobs not parallel

Hi,

According to the documenation, the jobs should run in parallel in the same stage. When no stage is provided, the default stage will be test.

I tried both with defining the same stage: … in .yml config file and without defining the stage. In both cases I see that my jobs / builds are NOT done in parallel! I created 2 runners. 1 runner with the tag ‘production’ the other one with the tag ‘testing’.

.

In my .gitlab-ci.yml file I defined 2 jobs, one job using ‘production’ tag and the other one using ‘testing’:

before_script:
    - composer update
    
testing:
  script:
    - vendor/bin/phpunit
  tags:
    - testing

building:
  script:
    - bin/console cache:clear --env=prod
    - bin/console assetic:dump --env=prod
  tags:
    - production

Why are the jobs not ran in parallel? They still wait on the other one (saying: Pending...) :frowning: . See screenshot below for more info:

I’m using Gitlab omnibus installation version 8.6.6.

Thanks.

Kind regards,
Melroy

What’s the concurrent value set to in your /etc/gitlab-runner/config.toml? I was tripped up by this initially to. I think it defaults the concurrency to 1. See docs for more details.

If you edit that file, it should be reloaded automatically and builds will parallelize as per the concurrent setting.

8 Likes

Thanks, it worked for me!

1 Like

The link is invalid I think this is the valid version of it.

1 Like

Correct it’s a new link… Here you go, this is the official documentation page: Advanced configuration | GitLab (you actually pointed to the raw markdown file)

See the concurrent configuration item for your config.toml file.

Example:

concurrent = 10
check_interval = 0
shutdown_timeout = 0

[session_server]
  session_timeout = 1800

[[runners]]
  name = "Default Docker runner"
  url = "secret"
  ## .... Removed some more lines.... ##
  executor = "docker"
  [runners.docker]
    tls_verify = false
    image = "alpine:3.17"
    privileged = false
    disable_entrypoint_overwrite = false
    oom_kill_disable = false
    disable_cache = false
    volumes = ["/cache"]
    shm_size = 0
    enable_ipv6 = false
1 Like