Gitlab runner not maintaining contact with gitlab.com

Summary

When I run a Gitlab runner locally, Gitlab itself shows “last contact: just now” in Settings->CI/CD->Runners initially and then it decays to “last contact: x minutes ago” where is is the number of minutes since I started the runner. The runner does not stop. I expect to see “last contact: just now” continuously.

Configuration

concurrent = 1
check_interval = 0

[session_server]
  session_timeout = 1800

[[runners]]
  name = "3900X"
  url = "https://gitlab.com/"
  token = "xxxxxxxxxxx"
  executor = "docker"
  [runners.custom_build_dir]
  [runners.cache]
    [runners.cache.s3]
    [runners.cache.gcs]
    [runners.cache.azure]
  [runners.docker]
    tls_verify = false
    image = "docker:git"
    privileged = true
    disable_entrypoint_overwrite = false
    oom_kill_disable = false
    disable_cache = false
    volumes = ["/cache"]
    shm_size = 0

The runner is running in docker and is started with the arguments --debug run --user=gitlab-runner --working-directory=/home/gitlab-runner.

Output

The output of the gitlab runner is as follows:

Runtime platform                                    arch=amd64 os=linux pid=7 revision=c1edb478 version=14.0.1
Starting multi-runner from /etc/gitlab-runner/config.toml...  builds=0
Checking runtime mode                               GOOS=linux uid=0
Running in system-mode.

Configuration loaded                                builds=0
listenaddress: ""
sessionserver:
  listenaddress: ""
  advertiseaddress: ""
  sessiontimeout: 1800
concurrent: 1
checkinterval: 0
loglevel: null
logformat: null
user: gitlab-runner
runners:
- name: 3900X
  limit: 0
  outputlimit: 0
  requestconcurrency: 0
  runnercredentials:
    url: https://gitlab.com/
    token: xxxxxxxxx
    tlscafile: ""
    tlscertfile: ""
    tlskeyfile: ""
  runnersettings:
    executor: docker
    buildsdir: ""
    cachedir: ""
    cloneurl: ""
    environment: []
    preclonescript: ""
    prebuildscript: ""
    postbuildscript: ""
    debugtracedisabled: false
    shell: ""
    custombuilddir:
      enabled: false
    referees: null
    cache:
      type: ""
      path: ""
      shared: false
      s3:
        serveraddress: ""
        accesskey: ""
        secretkey: ""
        bucketname: ""
        bucketlocation: ""
        insecure: false
      gcs:
        cachegcscredentials:
          accessid: ""
          privatekey: ""
        credentialsfile: ""
        bucketname: ""
      azure:
        cacheazurecredentials:
          accountname: ""
          accountkey: ""
        containername: ""
        storagedomain: ""
    gracefulkilltimeout: null
    forcekilltimeout: null
    featureflags: {}
    ssh: null
    docker:
      credentials:
        host: ""
        certpath: ""
        tlsverify: false
      hostname: ""
      image: docker:git
      runtime: ""
      memory: ""
      memoryswap: ""
      memoryreservation: ""
      cpusetcpus: ""
      cpus: ""
      cpushares: 0
      dns: []
      dnssearch: []
      privileged: true
      disableentrypointoverwrite: false
      usernsmode: ""
      capadd: []
      capdrop: []
      oomkilldisable: false
      oomscoreadjust: 0
      securityopt: []
      devices: []
      gpus: ""
      disablecache: false
      volumes:
      - /cache
      volumedriver: ""
      cachedir: ""
      extrahosts: []
      volumesfrom: []
      networkmode: ""
      links: []
      services: []
      waitforservicestimeout: 0
      allowedimages: []
      allowedservices: []
      pullpolicy: []
      shmsize: 0
      tmpfs: {}
      servicestmpfs: {}
      sysctls: {}
      helperimage: ""
      helperimageflavor: ""
    parallels: null
    virtualbox: null
    machine: null
    kubernetes: null
    custom: null
sentrydsn: null
modtime: 2021-06-30T11:29:22.9820886Z
loaded: true
  builds=0
Waiting for stop signal                             builds=0
listen_address not defined, metrics & debug endpoints disabled  builds=0
[session_server].listen_address not defined, session endpoints disabled  builds=0
Feeding runners to channel                          builds=0
Starting worker                                     builds=0 worker=0
Dialing: tcp gitlab.com:443 ...
Checking for jobs... nothing                        runner=t6pse84X
Feeding runners to channel                          builds=0
Feeding runners to channel                          builds=0
Checking for jobs... nothing                        runner=t6pse84X
Feeding runners to channel                          builds=0
Checking for jobs... nothing                        runner=t6pse84X
Feeding runners to channel                          builds=0
Checking for jobs... nothing                        runner=t6pse84X
Feeding runners to channel                          builds=0
Checking for jobs... nothing                        runner=t6pse84X
Feeding runners to channel                          builds=0
Checking for jobs... nothing                        runner=t6pse84X
Feeding runners to channel                          builds=0
Checking for jobs... nothing                        runner=t6pse84X
Feeding runners to channel                          builds=0
Checking for jobs... nothing                        runner=t6pse84X
Feeding runners to channel                          builds=0

On gitlab.com, I see

Expected Output

I expect to see “Last contact: just now” on gitlab.com.