Gitlab Runner with docker+autoscaler: Pipelines are slow to be cancelled

Problem to solve

After switching our self-hosted runner with machines in the GCP from docker+machine to docker-autoscaler I’ve noticed, that actually cancelling a pipeline suddenly might take anywhere from 10sec to 1min.
Before it was more or less immediate. Also, I’ve noticed that when the machine in the background is suddenly gone (e.g. due to GCP preemption of spot VMs or accidentally breaking and restarting the runner :angel: ), the cancelling might never finish.

This is especially a problem in combination with another bug where the “Merge” button in a Merge Request does not start the configured merge train, but just merges immediately: Merge train option missing under certain circumstances (#471054) · Issues · GitLab.org / GitLab · GitLab

Are there any configuration options for the runner or the fleeting plugin to make this faster?

Configuration

[[runners]]
    name = "docker-autoscaler-1"
    url  = "https://gitlab.com/"
    token    = "xxxxx"
    executor = "docker-autoscaler"
    limit        = 200 
    output_limit = 30000
    cache_dir  = "/cache"
    builds_dir = "/builds"

    [runners.docker]
        helper_image = "<helper-image>"
        image        = "ubuntu:24.04"
        pull_policy = ["always"]
        tls_verify                   = false
        privileged                   = false
        disable_entrypoint_overwrite = false
        oom_kill_disable             = false
        disable_cache                = false
        shm_size                     = 2000000000

        volumes = [
            "/var/run/docker.sock:/var/run/docker.sock",
            "/cache",
            "/builds",
        ]

    [runners.autoscaler]
        plugin = "fleeting-plugin-googlecloud"
        max_instances         = 200 
        max_use_count         = 50  
        capacity_per_instance = 1  
        update_interval                = "15s"
        update_interval_when_expecting = "1s"

        [runners.autoscaler.plugin_config]
         ...

Versions

GitLab.com SaaS: 17.2.0-pre
Self-hosted Runners: 17.1.0