Too many calls to the GitHub API cause throttling

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      We have a multibranch pipeline configured with a GitHub App credential. We use the SSH checkout trait with another ssh credential to perform the checkout.

      For one repository only, we hit about 1000 calls, excluding our shared library, to the github API with our GitHub App token. Here is the details of these calls for 1h in a single repository. We can see that there is quite a high amount of calls to the /repos/{owner}/{repository}/git/refs/heads/{branch} and /repos/{owner}/{repository} endpoints.

      The high amount of calls cause our builds to sleep so we avoid being rate limited by GitHub. I believe Github branch source plugin is making most of these calls. The repo is not configured for polling and it is configured with the Discover All branches strategy.

       

      Our Shared Library is also configured to use the GitHub SCM with a GitHub App and checkout over SSH, but we only have 1 call to /repos/{owner}/{repository} and 1 to /repos/{owner}/{repository}/branches/{branch} per build which seems normal. Although, some caching could be done there as well to further reduce the amount of calls.

        1. screenshot-1.png
          129 kB
          Alexandre Gaudreault

            Assignee:
            Unassigned
            Reporter:
            Alexandre Gaudreault
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Archived: