Skip to content

Commit c59531e

Browse files
brcristamattpollardlucascosti
authored
Configurable rate limit for GitHub Actions on GHES (github#16945)
Co-authored-by: Matt Pollard <[email protected]> Co-authored-by: Lucas Costi <[email protected]>
1 parent cc6c93c commit c59531e

File tree

2 files changed

+48
-1
lines changed

2 files changed

+48
-1
lines changed

content/admin/configuration/configuring-your-enterprise/configuring-rate-limits.md

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Setting secondary rate limits protects the overall level of service on {% data v
5050
3. Type limits for Total Requests, CPU Limit, and CPU Limit for Searching, or accept the pre-filled default limits.
5151
{% data reusables.enterprise_management_console.save-settings %}
5252

53-
## Enabling Git rate limits
53+
## Enabling rate limits for Git
5454

5555
You can apply Git rate limits per repository network or per user ID. Git rate limits are expressed in concurrent operations per minute, and are adaptive based on the current CPU load.
5656

@@ -61,3 +61,44 @@ You can apply Git rate limits per repository network or per user ID. Git rate li
6161
3. Type limits for each repository network or user ID.
6262
![Fields for repository network and user ID limits](/assets/images/enterprise/management-console/example-git-rate-limits.png)
6363
{% data reusables.enterprise_management_console.save-settings %}
64+
65+
{% ifversion ghes > 3.4 %}
66+
67+
## Configuring rate limits for {% data variables.product.prodname_actions %}
68+
69+
You can apply a rate limit to {% data variables.product.prodname_actions %} workflow runs. For more information about {% data variables.product.prodname_actions %}, see "[About {% data variables.product.prodname_actions %} for enterprises](/admin/github-actions/getting-started-with-github-actions-for-your-enterprise/about-github-actions-for-enterprises)."
70+
71+
### About rate limits for {% data variables.product.prodname_actions %}
72+
73+
Your {% data variables.product.product_name %} instance assigns each {% data variables.product.prodname_actions %} workflow job to a runner. If your instance cannot immediately assign a job to an available runner, the job will wait in a queue until a runner is available. If {% data variables.product.prodname_actions %} experiences sustained high load, the queue can back up, and the performance of {% data variables.product.product_location %} may degrade.
74+
75+
To avoid this performance degradation, you can configure a rate limit for {% data variables.product.prodname_actions %}. This rate limit is expressed in job runs per minute. {% data variables.product.product_name %} calculates and applies the rate limit for the sum total of all job runs on the instance. If runs exceed the rate limit, additional runs will fail instead of entering the queue. The following error will appear in the run's annotations.
76+
77+
> You've exceeded the rate limit for workflow run requests. Please wait before retrying the run.
78+
79+
An appropriate rate limit protects {% data variables.product.product_location %} from abnormal usage of {% data variables.product.prodname_actions %} without interfering with day-to-day operations. The exact threshold depends on your instance's available resources and overall load profile. For more information about the hardware requirements for {% data variables.product.prodname_actions %}, see "[Getting started with {% data variables.product.prodname_actions %} for {% data variables.product.product_name %}](/admin/github-actions/getting-started-with-github-actions-for-your-enterprise/getting-started-with-github-actions-for-github-enterprise-server#review-hardware-requirements)."
80+
81+
By default, the rate limit for {% data variables.product.prodname_actions %} is disabled. Because {% data variables.product.product_name %} can handle temporary spikes in usage without performance degradation, this rate limit is intended to protect against sustained high load. We recommend leaving the rate limit disabled unless you are experiencing performance problems. In some cases, {% data variables.contact.github_support %} may recommend that you enable a rate limit for {% data variables.product.prodname_actions %}.
82+
83+
### Enabling or disabling rate limits for {% data variables.product.prodname_actions %}
84+
85+
{% data reusables.enterprise_installation.ssh-into-instance %}
86+
1. To enable and configure the rate limit, run the following two commands, replacing **RUNS-PER-MINUTE** with the value of your choice.
87+
88+
```shell
89+
ghe-config actions-rate-limiting.enabled true
90+
ghe-config actions-rate-limiting.queue-runs-per-minute <em>RUNS-PER-MINUTE</em>
91+
```
92+
1. To disable the rate limit after it's been enabled, run the following command.
93+
94+
```
95+
ghe-config actions-rate-limiting.enabled false
96+
```
97+
1. To apply the configuration, run the following command.
98+
99+
```
100+
ghe-config-apply
101+
```
102+
1. Wait for the configuration run to complete.
103+
104+
{% endif %}

content/admin/github-actions/getting-started-with-github-actions-for-your-enterprise/getting-started-with-github-actions-for-github-enterprise-server.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,12 @@ For more information about minimum hardware requirements for {% data variables.p
9494

9595
{% data reusables.enterprise_installation.about-adjusting-resources %}
9696

97+
{% ifversion ghes > 3.4 %}
98+
99+
Optionally, you can limit resource consumption on {% data variables.product.product_location %} by configuring a rate limit for {% data variables.product.prodname_actions %}. For more information, see "[Configuring rate limits](/admin/configuration/configuring-your-enterprise/configuring-rate-limits#configuring-rate-limits-for-github-actions)."
100+
101+
{% endif %}
102+
97103
## External storage requirements
98104

99105
To enable {% data variables.product.prodname_actions %} on {% data variables.product.prodname_ghe_server %}, you must have access to external blob storage.

0 commit comments

Comments
 (0)