Skip to content

Problem: database migration "panic:timeout" for boltdb -> sqlite #3874

@jforman

Description

@jforman

Issue

When trying to perform the boltdb to sqlite database migration, it seems the command times out:

aa6805336351:/var/lib/semaphore$ time semaphore migrate --from-boltdb `pwd`/database.boltdb --config /etc/semaphore/config.json --log-level DEBUG
Log level set to debug
panic: timeout

goroutine 1 [running]:
github.com/semaphoreui/semaphore/db/bolt.(*BoltDb).openDbFile(0xc000269508)
        /go/src/semaphore/db/bolt/BoltDb.go:120 +0x18e
github.com/semaphoreui/semaphore/db/bolt.(*BoltDb).Connect(0xc000269508, {0x1895df5, 0x7})
        /go/src/semaphore/db/bolt/BoltDb.go:149 +0x33
github.com/semaphoreui/semaphore/cli/cmd.createStoreWithMigrationVersion({0x1895df5, 0x7}, 0x0, 0x0)
        /go/src/semaphore/cli/cmd/root.go:289 +0x67
github.com/semaphoreui/semaphore/cli/cmd.init.func2(0xc000101700?, {0x1892275?, 0x4?, 0x1892279?})
        /go/src/semaphore/cli/cmd/migrate.go:54 +0x77
github.com/spf13/cobra.(*Command).execute(0x3e2a5a0, {0xc00008c4e0, 0x6, 0x6})
        /go/src/semaphore/vendor/github.com/spf13/cobra/command.go:1019 +0xa91
github.com/spf13/cobra.(*Command).ExecuteC(0x3e2ae40)
        /go/src/semaphore/vendor/github.com/spf13/cobra/command.go:1148 +0x46f
github.com/spf13/cobra.(*Command).Execute(...)
        /go/src/semaphore/vendor/github.com/spf13/cobra/command.go:1071
github.com/semaphoreui/semaphore/cli/cmd.Execute()
        /go/src/semaphore/cli/cmd/root.go:69 +0xc5
main.main()
        /go/src/semaphore/cli/main.go:8 +0xf

real    0m4.998s
user    0m0.015s
sys     0m0.023s

Impact

Database

Installation method

Docker

Database

BoltDB

Browser

No response

Semaphore Version

v2.18.4^0-7ca373d-1779131288

Ansible Version

Logs & errors

No response

Manual installation - system information

aa6805336351:/var/lib/semaphore$ uname -a
Linux aa6805336351 6.17.2-1-pve #1 SMP PREEMPT_DYNAMIC PMX 6.17.2-1 (2025-10-21T11:55Z) x86_64 Linux

Configuration

$ cat docker-compose.yaml
# https://hub.docker.com/r/semaphoreui/semaphore/tags
services:
    semaphore:
        ports:
            - 3000:3000
        image: semaphoreui/semaphore:latest
        environment:
            SEMAPHORE_DB_DIALECT: bolt
            SEMAPHORE_ADMIN: admin
            SEMAPHORE_ADMIN_PASSWORD: ....
            SEMAPHORE_ADMIN_NAME: Admin
            SEMAPHORE_ADMIN_EMAIL: ....
            SEMAPHORE_EMAIL_ALERT: "True"
            SEMAPHORE_EMAIL_SENDER: ...
            SEMAPHORE_EMAIL_HOST: 10.10.2.1
            SEMAPHORE_SLACK_ALERT: "True"
            SEMAPHORE_SLACK_URL: "https://hooks.slack.com/services/...."
            ANSIBLE_HOST_KEY_CHECKING: "False"
        volumes:
            - semaphore_data:/var/lib/semaphore
            - semaphore_config:/etc/semaphore
            - semaphore_tmp:/tmp/semaphore
            - /home/casket/docker/etc/requirements.txt:/etc/semaphore/requirements.txt
            - /home/casket/docker/etc/requirements.yml:/home/semaphore/requirements.yml
        restart: unless-stopped
volumes:
    semaphore_data:
    semaphore_config:

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions