Skip to main content

Configuring rate limits

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

この機能を使用できるユーザーについて

Site administrators can configure rate limits for a GitHub Enterprise Server instance.

About rate limits for GitHub Enterprise Server

To prevent excessive use of resources on お使いの GitHub Enterprise Server インスタンス 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 "管理コンソールへのアクセスの管理."

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 "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 "コマンド ライン ユーティリティ."

Note: The [Management Console] lists the time period (per minute or per hour) for each rate limit.

  1. GitHub Enterprise Server の管理アカウントから、任意のページの右上隅で をクリックします。

  2. [サイト管理者] ページにまだ表示されていない場合は、左上隅の [サイト管理者] をクリックします。

  3. [ サイト管理者] サイドバーで [Management Console] をクリックします。

  4. Under "Rate Limiting", select Enable HTTP API Rate Limiting.

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

  6. [設定] サイドバーで [設定の保存] をクリックします。

    注: [Management Console] に設定を保存すると、システム サービスが再起動され、ユーザーに表示されるダウンタイムが発生する可能性があります。

  7. 設定の実行が完了するのを待ってください。

Enabling secondary rate limits

Setting secondary rate limits protects the overall level of service on お使いの GitHub Enterprise Server インスタンス.

  1. GitHub Enterprise Server の管理アカウントから、任意のページの右上隅で をクリックします。

  2. [サイト管理者] ページにまだ表示されていない場合は、左上隅の [サイト管理者] をクリックします。

  3. [ サイト管理者] サイドバーで [Management Console] をクリックします。

  4. Under "Rate Limiting", select Enable Secondary Rate Limiting.

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

  6. [設定] サイドバーで [設定の保存] をクリックします。

    注: [Management Console] に設定を保存すると、システム サービスが再起動され、ユーザーに表示されるダウンタイムが発生する可能性があります。

  7. 設定の実行が完了するのを待ってください。

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. GitHub Enterprise Server の管理アカウントから、任意のページの右上隅で をクリックします。

  2. [サイト管理者] ページにまだ表示されていない場合は、左上隅の [サイト管理者] をクリックします。

  3. [ サイト管理者] サイドバーで [Management Console] をクリックします。

  4. Under "Rate Limiting", select Enable Git Rate Limiting.

  5. Under "Repository Network Limit", type a limit for each repository network.

  6. Under "User ID Limit", type a limit for each user ID.

  7. [設定] サイドバーで [設定の保存] をクリックします。

    注: [Management Console] に設定を保存すると、システム サービスが再起動され、ユーザーに表示されるダウンタイムが発生する可能性があります。

  8. 設定の実行が完了するのを待ってください。

Configuring rate limits for GitHub Actions

You can apply a rate limit to GitHub Actions workflow runs. For more information about GitHub Actions, see "About GitHub Actions for enterprises."

About rate limits for GitHub Actions

Your GitHub Enterprise Server instance assigns each GitHub 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 GitHub Actions experiences sustained high load, the queue can back up, and the performance of お使いの GitHub Enterprise Server インスタンス may degrade.

To avoid this performance degradation, you can configure a rate limit for GitHub Actions. This rate limit is expressed in job runs per minute. GitHub Enterprise Server 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.

You've exceeded the rate limit for workflow run requests. Please wait before retrying the run.

An appropriate rate limit protects お使いの GitHub Enterprise Server インスタンス from abnormal usage of GitHub 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 GitHub Actions, see "Getting started with GitHub Actions for GitHub Enterprise Server."

By default, the rate limit for GitHub Actions is disabled. Because GitHub Enterprise Server 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, GitHub Support may recommend that you enable a rate limit for GitHub Actions.

Enabling or disabling rate limits for GitHub Actions

  1. お使いの GitHub Enterprise Server インスタンス に SSH で接続します。 インスタンスが複数のノードで構成されている場合は (高可用性や geo レプリケーションが構成されている場合など)、プライマリ ノードに SSH 接続します。 クラスターを使用する場合は、任意のノードに SSH 接続できます。 HOSTNAME をインスタンスのホスト名、またはノードのホスト名または IP アドレスに置き換えます。 詳しくは、「管理シェル (SSH) にアクセスする」を参照してください。

    Shell
    ssh -p 122 admin@HOSTNAME
    
  2. To enable and configure the rate limit, run the following two commands, replacing RUNS-PER-MINUTE with the value of your choice.

    ghe-config actions-rate-limiting.enabled true
    ghe-config actions-rate-limiting.queue-runs-per-minute RUNS-PER-MINUTE
    
  3. To disable the rate limit after it's been enabled, run the following command.

    ghe-config actions-rate-limiting.enabled false
    
  4. To apply the configuration, run the following command.

    ghe-config-apply
    
  5. Wait for the configuration run to complete.