Self-Hosted Github actions runner listener uses huge amount of virtual memory when idle
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 6.3k
- Forks
- 1.4k
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 24
Description
Describe the bug
I’m running into a strange issue with my self-hosted GitHub Actions runner where the listener process is using an enormous amount of virtual memory—around 700GB—even when it’s idle and no workflows are running. This is causing problems on my private VPS, as other applications are being terminated due to insufficient swap space.
What's not working?
Enormous VMEM usage - is possible to limit the VMEM usage for runner? Is there config somewhere where I could specify max usage for virtual memory?
Main part of the workflow used for building the docker images and running the containers:
jobs:
deploy:
runs-on: self-hosted
steps:
- name: Add GitHub to the SSH known hosts file
run: |
[...]
- name: Collect Git and SSH config files in a directory that is part of the Docker build context
run: |
mkdir root-config
cp -r ~/.gitconfig ~/.ssh root-config/
- name: Stop and Remove Existing Container (if running)
run: |
docker stop app-test || true
docker rm app-test || true
- name: Remove Old Docker Image (if exists)
run: |
docker rmi app:test || true
- name: Build docker image
run: |
docker build -f test.dockerfile -t app:test --ssh default=${{ env.SSH_AUTH_SOCK }} .
- name: Run the container
run: |
docker run \
-e LOG_DIR=/home/app/logs \
-e WORK_DIR=/home/app \
--cpus="8.0" \
--memory="100g" \
-d \
--name app-test \
app:test
Runner Version and Platform
Current runner version: '2.322.0'
Ubuntu 24.04.1 LTS
- I’m running the self-hosted runner directly on a private VPS with Ubuntu 20.04. This machine has 346 GB of RAM
- The runner is set up to process workflows for my repositories (building Docker containers of app), but this high memory usage happens even when no jobs are active.
- When I check with
htop, the VIRT (virtual memory) for the listener process shows ~700GB, while the RES (physical memory) stays low, below 100 MB. - I tried using
ulimit -v, but after setting it to 1 GB (or even 50gb) it won't start the runner (./run.sh)
devops-user:~/actions-runner$ ./run.sh
GC heap initialization failed with error 0x8007000E
Failed to create CoreCLR, HRESULT: 0x8007000E
Exiting with unknown error code: 137
Exiting runner...
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the self-hosted runner's listener process and the ./run.sh entry point, then reproduce the VIRT-versus-RES behavior on Ubuntu 24.04 with runner version 2.322.0. Check whether the reported Docker workflow or the ulimit setting changes the behavior; done means identifying a runner-controlled cause or documenting whether virtual-memory limits are supported without preventing startup.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, docker, github-actions, ubuntu
- Domain
- ci-cd, devops, infrastructure
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100