# Resource limits drop-in for gitea-act_runner@.service # ====================================================== # # Installed to: # /etc/systemd/system/gitea-act_runner@.service.d/limits.conf # # This file is shipped with all values commented out as examples. # Uncomment and adjust to protect the host from runaway CI jobs. # # A runaway build can exhaust memory and take down user@125.service # (the rootless user manager), which kills the Podman socket and # breaks all running runners until the service is restarted. # # Setting MemoryHigh/MemoryMax caps the cgroup, so the kernel OOM # killer targets the runner's children first instead of user@.service. # # Recommended starting points for a dedicated CI host: # MemoryHigh : soft limit — kernel throttles above this # MemoryMax : hard limit — kernel kills processes above this # TasksMax : max number of tasks (processes + threads) # # Also consider adding matching limits in your runner config.yaml # under container.options, e.g.: # options: --memory=8g --memory-swap=8g -v /var/cache/act-runner/pnpm-store:/cache/pnpm-store:z # # After editing, reload systemd: # systemctl daemon-reload # systemctl restart gitea-act_runner@.service [Service] # MemoryHigh=10G # MemoryMax=12G # TasksMax=4096