Skip to main content

This version of GitHub Enterprise was discontinued on 2023-01-18. No patch releases will be made, even for critical security issues. For better performance, improved security, and new features, upgrade to the latest version of GitHub Enterprise. For help with the upgrade, contact GitHub Enterprise support.

Configuring rate limits

You can set rate limits for GitHub Enterprise Server using the Management Console.

Enabling rate limits for the GitHub Enterprise Server APIs

Enabling rate limits on the GitHub Enterprise Server APIs can prevent overuse of resources by individual or unauthenticated users. For more information, 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.

  1. From an administrative account on GitHub Enterprise Server, in the upper-right corner of any page, click .

    Screenshot of the rocket ship icon for accessing site admin settings

  2. If you're not already on the "Site admin" page, in the upper-left corner, click Site admin.

    Screenshot of "Site admin" link

  3. In the left sidebar, click Management Console. Management Console tab in the left sidebar

  4. Under "Rate Limiting", select Enable HTTP API Rate Limiting. Checkbox for enabling API rate limiting

  5. Type limits for authenticated and unauthenticated requests for each API, or accept the pre-filled default limits.

  6. Under the left sidebar, click Save settings.

    Screenshot of the save settings button in the Management Console

    Note: Saving settings in the Management Console restarts system services, which could result in user-visible downtime.

  7. Wait for the configuration run to complete.

    Configuring your instance

Enabling secondary rate limits

Setting secondary rate limits protects the overall level of service on your GitHub Enterprise Server instance.

  1. From an administrative account on GitHub Enterprise Server, in the upper-right corner of any page, click .

    Screenshot of the rocket ship icon for accessing site admin settings

  2. If you're not already on the "Site admin" page, in the upper-left corner, click Site admin.

    Screenshot of "Site admin" link

  3. In the left sidebar, click Management Console. Management Console tab in the left sidebar

  4. Under "Rate Limiting", select Enable Secondary Rate Limiting. Checkbox for enabling secondary rate limiting

  5. Type limits for Total Requests, CPU Limit, and CPU Limit for Searching, or accept the pre-filled default limits.

  6. Under the left sidebar, click Save settings.

    Screenshot of the save settings button in the Management Console

    Note: Saving settings in the Management Console restarts system services, which could result in user-visible downtime.

  7. Wait for the configuration run to complete.

    Configuring your instance

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.

  1. From an administrative account on GitHub Enterprise Server, in the upper-right corner of any page, click .

    Screenshot of the rocket ship icon for accessing site admin settings

  2. If you're not already on the "Site admin" page, in the upper-left corner, click Site admin.

    Screenshot of "Site admin" link

  3. In the left sidebar, click Management Console. Management Console tab in the left sidebar

  4. Under "Rate Limiting", select Enable Git Rate Limiting. Checkbox for enabling Git rate limiting

  5. Type limits for each repository network or user ID. Fields for repository network and user ID limits

  6. Under the left sidebar, click Save settings.

    Screenshot of the save settings button in the Management Console

    Note: Saving settings in the Management Console restarts system services, which could result in user-visible downtime.

  7. Wait for the configuration run to complete.

    Configuring your instance