[GH-ISSUE #1825] running two act commands in parallel results in timeout #890

Closed
opened 2026-03-01 21:47:12 +03:00 by kerem · 6 comments
Owner

Originally created by @andre15silva on GitHub (May 27, 2023).
Original GitHub issue: https://github.com/nektos/act/issues/1825

Bug report info

❯ act --bug-report
act version:            0.2.45
GOOS:                   linux
GOARCH:                 amd64
NumCPU:                 16
Docker host:            DOCKER_HOST environment variable is not set
Sockets found:
	/var/run/docker.sock
Config files:
Build info:
	Go version:            go1.20.4
	Module path:           github.com/nektos/act
	Main version:          (devel)
	Main path:             github.com/nektos/act
	Main checksum:
	Build settings:
		-buildmode:           pie
		-compiler:            gc
		-trimpath:            true
		CGO_ENABLED:          1
		GOARCH:               amd64
		GOOS:                 linux
		GOAMD64:              v1
		vcs:                  git
		vcs.revision:         25dd7a13c00002e8fad19eca9f03a67d4ff8163a
		vcs.time:             2023-05-02T14:22:58Z
		vcs.modified:         true
Docker Engine:
	Engine version:        24.0.0
	Engine runtime:        runc
	Cgroup version:        2
	Cgroup driver:         systemd
	Storage driver:        overlay2
	Registry URI:          https://index.docker.io/v1/
	OS:                    Arch Linux
	OS type:               linux
	OS version:
	OS arch:               x86_64
	OS kernel:             6.3.3-arch1-1
	OS CPU:                16
	OS memory:             31532 MB
	Security options:
		name=seccomp,profile=builtin
		name=cgroupns

Command used with act

act -P ubuntu-latest=catthehacker/ubuntu:full-latest --rm --bind --container-options '-u 1000:1000' -W .github/workflows/tests.yml

Describe issue

I am trying to run two act commands in parallel (not necessarily on the same project, we also tried running different workflows from different projects in parallel).

The first command runs as usual.
However, the second and later commands always end up in the same error: `Error: timeout.

Does act support parallel executions of different workflows? I could not find any mention to that in the documentation nor the issues.

https://github.com/ASSERT-KTH/flacoco

Workflow content

name: tests

on: [push, pull_request]

jobs:
  build:
    runs-on: ${{ matrix.os }}

    strategy:
      matrix:
        java-version: [ 8 , 11 , 16 , 17 ]
        compiler-version: [ 1.1 , 1.2 , 1.3 , 1.4 , 5 , 6 , 7 , 8 , 9 , 10 , 11 , 12 , 13 , 14 , 15 , 16 , 17 ]
        os: [ ubuntu-latest , macos-latest , windows-latest ]

    steps:
      - name: Checkout
        uses: actions/checkout@v3.5.2
        if: ${{ matrix.compiler-version <= matrix.java-version && (matrix.java-version < 14 || matrix.compiler-version >= 7) && (matrix.java-version < 11 || matrix.compiler-version >= 6) }}

      - name: Setup JDK${{ matrix.java-version }}
        uses: actions/setup-java@v3
        if: ${{ matrix.compiler-version <= matrix.java-version && (matrix.java-version < 14 || matrix.compiler-version >= 7) && (matrix.java-version < 11 || matrix.compiler-version >= 6) }}
        with:
          java-version: ${{ matrix.java-version }}
          distribution: 'temurin'

      - name: Install example projects
        run: ./.github/install_examples.sh
        if: ${{ matrix.compiler-version <= matrix.java-version && (matrix.java-version < 14 || matrix.compiler-version >= 7) && (matrix.java-version < 11 || matrix.compiler-version >= 6) }}
        shell: bash
        env:
          SRC_VERSION: ${{ matrix.compiler-version }}
      - name: Build and run tests
        run: mvn --batch-mode clean test
        if: ${{ matrix.compiler-version <= matrix.java-version && (matrix.java-version < 14 || matrix.compiler-version >= 7) && (matrix.java-version < 11 || matrix.compiler-version >= 6) }}
        env:
          SRC_VERSION: ${{ matrix.compiler-version }}

      - name: Codecov
        uses: codecov/codecov-action@v3.1.2
        if: ${{ matrix.compiler-version == 8 && matrix.java-version == 8 && matrix.os == 'ubuntu-latest' }}

Relevant log output

❯ act -P ubuntu-latest=catthehacker/ubuntu:full-latest --rm --bind --container-options '-u 1000:1000' -W .github/workflows/tests.yml -v
DEBU[0000] Loading environment from /home/andre/Repos/flacoco/.env
DEBU[0000] Loading action inputs from /home/andre/Repos/flacoco/.input
DEBU[0000] Loading secrets from /home/andre/Repos/flacoco/.secrets
DEBU[0000] Evaluated matrix inclusions: map[]
DEBU[0000] Loading workflow '/home/andre/Repos/flacoco/.github/workflows/tests.yml'
DEBU[0000] Reading workflow '/home/andre/Repos/flacoco/.github/workflows/tests.yml'
DEBU[0000] Conditional GET for notices etag=0d767207-f640-4fe2-81f0-b0185bc1bc73
DEBU[0000] Preparing plan with all jobs
DEBU[0000] Using default workflow event: push
DEBU[0000] Planning jobs for event: push
DEBU[0000] Saving notices etag=0d767207-f640-4fe2-81f0-b0185bc1bc73
DEBU[0000] No new notices
Error: timeout

Additional information

No response

Originally created by @andre15silva on GitHub (May 27, 2023). Original GitHub issue: https://github.com/nektos/act/issues/1825 ### Bug report info ```plain text ❯ act --bug-report act version: 0.2.45 GOOS: linux GOARCH: amd64 NumCPU: 16 Docker host: DOCKER_HOST environment variable is not set Sockets found: /var/run/docker.sock Config files: Build info: Go version: go1.20.4 Module path: github.com/nektos/act Main version: (devel) Main path: github.com/nektos/act Main checksum: Build settings: -buildmode: pie -compiler: gc -trimpath: true CGO_ENABLED: 1 GOARCH: amd64 GOOS: linux GOAMD64: v1 vcs: git vcs.revision: 25dd7a13c00002e8fad19eca9f03a67d4ff8163a vcs.time: 2023-05-02T14:22:58Z vcs.modified: true Docker Engine: Engine version: 24.0.0 Engine runtime: runc Cgroup version: 2 Cgroup driver: systemd Storage driver: overlay2 Registry URI: https://index.docker.io/v1/ OS: Arch Linux OS type: linux OS version: OS arch: x86_64 OS kernel: 6.3.3-arch1-1 OS CPU: 16 OS memory: 31532 MB Security options: name=seccomp,profile=builtin name=cgroupns ``` ### Command used with act ```sh act -P ubuntu-latest=catthehacker/ubuntu:full-latest --rm --bind --container-options '-u 1000:1000' -W .github/workflows/tests.yml ``` ### Describe issue I am trying to run two act commands in parallel (not necessarily on the same project, we also tried running different workflows from different projects in parallel). The first command runs as usual. However, the second and later commands always end up in the same error: `Error: timeout. Does act support parallel executions of different workflows? I could not find any mention to that in the documentation nor the issues. ### Link to GitHub repository https://github.com/ASSERT-KTH/flacoco ### Workflow content ```yml name: tests on: [push, pull_request] jobs: build: runs-on: ${{ matrix.os }} strategy: matrix: java-version: [ 8 , 11 , 16 , 17 ] compiler-version: [ 1.1 , 1.2 , 1.3 , 1.4 , 5 , 6 , 7 , 8 , 9 , 10 , 11 , 12 , 13 , 14 , 15 , 16 , 17 ] os: [ ubuntu-latest , macos-latest , windows-latest ] steps: - name: Checkout uses: actions/checkout@v3.5.2 if: ${{ matrix.compiler-version <= matrix.java-version && (matrix.java-version < 14 || matrix.compiler-version >= 7) && (matrix.java-version < 11 || matrix.compiler-version >= 6) }} - name: Setup JDK${{ matrix.java-version }} uses: actions/setup-java@v3 if: ${{ matrix.compiler-version <= matrix.java-version && (matrix.java-version < 14 || matrix.compiler-version >= 7) && (matrix.java-version < 11 || matrix.compiler-version >= 6) }} with: java-version: ${{ matrix.java-version }} distribution: 'temurin' - name: Install example projects run: ./.github/install_examples.sh if: ${{ matrix.compiler-version <= matrix.java-version && (matrix.java-version < 14 || matrix.compiler-version >= 7) && (matrix.java-version < 11 || matrix.compiler-version >= 6) }} shell: bash env: SRC_VERSION: ${{ matrix.compiler-version }} - name: Build and run tests run: mvn --batch-mode clean test if: ${{ matrix.compiler-version <= matrix.java-version && (matrix.java-version < 14 || matrix.compiler-version >= 7) && (matrix.java-version < 11 || matrix.compiler-version >= 6) }} env: SRC_VERSION: ${{ matrix.compiler-version }} - name: Codecov uses: codecov/codecov-action@v3.1.2 if: ${{ matrix.compiler-version == 8 && matrix.java-version == 8 && matrix.os == 'ubuntu-latest' }} ``` ### Relevant log output ```sh ❯ act -P ubuntu-latest=catthehacker/ubuntu:full-latest --rm --bind --container-options '-u 1000:1000' -W .github/workflows/tests.yml -v DEBU[0000] Loading environment from /home/andre/Repos/flacoco/.env DEBU[0000] Loading action inputs from /home/andre/Repos/flacoco/.input DEBU[0000] Loading secrets from /home/andre/Repos/flacoco/.secrets DEBU[0000] Evaluated matrix inclusions: map[] DEBU[0000] Loading workflow '/home/andre/Repos/flacoco/.github/workflows/tests.yml' DEBU[0000] Reading workflow '/home/andre/Repos/flacoco/.github/workflows/tests.yml' DEBU[0000] Conditional GET for notices etag=0d767207-f640-4fe2-81f0-b0185bc1bc73 DEBU[0000] Preparing plan with all jobs DEBU[0000] Using default workflow event: push DEBU[0000] Planning jobs for event: push DEBU[0000] Saving notices etag=0d767207-f640-4fe2-81f0-b0185bc1bc73 DEBU[0000] No new notices Error: timeout ``` ### Additional information _No response_
kerem 2026-03-01 21:47:12 +03:00
  • closed this issue
  • added the
    kind/bug
    label
Author
Owner

@andre15silva commented on GitHub (May 27, 2023):

Seems like the bug only occurs in version 0.2.45. The issue does not arise in version 0.2.44

<!-- gh-comment-id:1565590208 --> @andre15silva commented on GitHub (May 27, 2023): Seems like the bug only occurs in version `0.2.45`. The issue does not arise in version `0.2.44`
Author
Owner

@grahul commented on GitHub (Jun 17, 2023):

Hi @andre15silva , Please can you let me know how you have install 0.2.44 i want to use 0.2.44

<!-- gh-comment-id:1595629652 --> @grahul commented on GitHub (Jun 17, 2023): Hi @andre15silva , Please can you let me know how you have install `0.2.44` i want to use `0.2.44`
Author
Owner

@andre15silva commented on GitHub (Jun 17, 2023):

Hi @grahul ,

You can get the binary from the release: https://github.com/nektos/act/releases/tag/v0.2.44

<!-- gh-comment-id:1595773770 --> @andre15silva commented on GitHub (Jun 17, 2023): Hi @grahul , You can get the binary from the release: https://github.com/nektos/act/releases/tag/v0.2.44
Author
Owner

@andre15silva commented on GitHub (Jun 23, 2023):

We have tracked it down to the cache server (introduced in v0.2.45). When we run with --no-cache-server, the problem with running act in parallel no longer exists.

<!-- gh-comment-id:1604601300 --> @andre15silva commented on GitHub (Jun 23, 2023): We have tracked it down to the cache server (introduced in `v0.2.45`). When we run with `--no-cache-server`, the problem with running act in parallel no longer exists.
Author
Owner

@ChristopherHX commented on GitHub (Jun 25, 2023):

bolthold db used by cache server doesn't support concurrent access to database.
github.com/nektos/act@4fc176f556/pkg/artifactcache/handler.go (L65C13-L65C26)

Using a different --cache-server-path also resolves the problem.

<!-- gh-comment-id:1606063316 --> @ChristopherHX commented on GitHub (Jun 25, 2023): bolthold db used by cache server doesn't support concurrent access to database. https://github.com/nektos/act/blob/4fc176f556dcf41e69854570ce65680f127a9357/pkg/artifactcache/handler.go#L65C13-L65C26 Using a different `--cache-server-path` also resolves the problem.
Author
Owner

@andre15silva commented on GitHub (Jun 25, 2023):

Hi @ChristopherHX,

Thanks for confirming this works! We were experimenting with this and have positive results on our end :)

<!-- gh-comment-id:1606141666 --> @andre15silva commented on GitHub (Jun 25, 2023): Hi @ChristopherHX, Thanks for confirming this works! We were experimenting with this and have positive results on our end :)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/act#890
No description provided.