About rate limits for GitHub Enterprise Server
To prevent excessive use of resources on your GitHub Enterprise Server instance that could affect the instance's availability or performance for all users, you can configure rate limits. Rate limits are configurable for the GitHub Enterprise Server APIs and GitHub Actions.
Implement rate limits carefully and communicate frequently with your users as you tune the limits. To avoid interrupting your users' work, GitHub recommends that you start with permissive rate limits, and gradually tune the limits to suit your environment.
You can also configure rate limits for authentication attempts to the Management Console. For more information, see "Managing access to the Management Console."
Enabling rate limits for the GitHub Enterprise Server APIs
Excessive numbers of requests to the GitHub Enterprise Server APIs can affect the availability and performance of your instance. For more information about how rate limits for the API affect your users, see "Resources in the REST API."
You can exempt a list of users from API rate limits using the ghe-config
utility in the administrative shell. For more information, see "Command-line utilities."
Note: The Management Console lists the time period (per minute or per hour) for each rate limit.
-
From an administrative account on GitHub Enterprise Server, in the upper-right corner of any page, click .
-
If you're not already on the "Site admin" page, in the upper-left corner, click Site admin.
-
In the " Site admin" sidebar, click Management Console.
-
Under "Rate Limiting", select Enable HTTP API Rate Limiting.
-
Type limits for authenticated and unauthenticated requests for each API, or accept the pre-filled default limits.
-
Under the "Settings" sidebar, click Save settings.
Note: Saving settings in the Management Console restarts system services, which could result in user-visible downtime.
-
Wait for the configuration run to complete.
Enabling secondary rate limits
Setting secondary rate limits protects the overall level of service on your GitHub Enterprise Server instance.
-
From an administrative account on GitHub Enterprise Server, in the upper-right corner of any page, click .
-
If you're not already on the "Site admin" page, in the upper-left corner, click Site admin.
-
In the " Site admin" sidebar, click Management Console.
-
Under "Rate Limiting", select Enable Secondary Rate Limiting.
-
Type limits for Total Requests, CPU Limit, and CPU Limit for Searching, or accept the pre-filled default limits.
-
Under the "Settings" sidebar, click Save settings.
Note: Saving settings in the Management Console restarts system services, which could result in user-visible downtime.
-
Wait for the configuration run to complete.
Enabling rate limits for Git
If a member of GitHub's staff has recommended it, 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.
Warning: We encourage you to leave this setting disabled unless directly recommended by a member of GitHub's staff. Git operations are rarely the leading driver of CPU and RAM usage. Enabling this feature can make Git operations more likely to fail under high load conditions but does not address the underlying cause of those conditions.
-
From an administrative account on GitHub Enterprise Server, in the upper-right corner of any page, click .
-
If you're not already on the "Site admin" page, in the upper-left corner, click Site admin.
-
In the " Site admin" sidebar, click Management Console.
-
Under "Rate Limiting", select Enable Git Rate Limiting.
-
Under "Repository Network Limit", type a limit for each repository network.
-
Under "User ID Limit", type a limit for each user ID.
-
Under the "Settings" sidebar, click Save settings.
Note: Saving settings in the Management Console restarts system services, which could result in user-visible downtime.
-
Wait for the configuration run to complete.