<div dir="ltr">The close-to-done work Stephen Connolly's been doing on github-branch-source apparently drops the API usage by something near an order of magnitude, which, needless to say, should help. =)<div><br></div><div>A.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Dec 8, 2016 at 9:05 AM, R. Tyler Croy <span dir="ltr"><<a href="mailto:tyler@monkeypox.org" target="_blank">tyler@monkeypox.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
GRUMBLEGRUMBLEGRUMBLE<br>
<br>
----- Forwarded message from Ivan ??u??ak <<a href="mailto:support@github.com">support@github.com</a>> -----<br>
<br>
Date: Thu, 08 Dec 2016 01:24:18 -0800<br>
From: Ivan ??u??ak <<a href="mailto:support@github.com">support@github.com</a>><br>
To: "R. Tyler Croy" <<a href="mailto:tyler@monkeypox.org">tyler@monkeypox.org</a>><br>
Subject: Re: Re: Increasing rate-limit for autnenticated activity on busy/large (jenkinsci) org<br>
Message-ID: <discussions/<wbr>a294f398bce711e68219709904fc93<wbr>cc/comments/<a href="mailto:3427963@github.com">3427963@github.com</a><wbr>><br>
<br>
Hello again, Tyler. Sure thing -- here are the stats for the past week:<br>
<br>
Top routes:<br>
<br>
/repositories/:repository_id/<wbr>collaborators      43,669  33.348%<br>
/repositories/:repository_id    21,349  16.303%<br>
/repositories/:repository_id/<wbr>contents/?*        17,410  13.295%<br>
/repositories/:repository_id/<wbr>statuses/:sha      13,757  10.506%<br>
/repositories/:repository_id/<wbr>pulls/:id  10,828  8.269%<br>
/repositories/:repository_id/<wbr>git/refs/* 6,582   5.026%<br>
/user   5,720   4.368%<br>
/       5,668   4.328%<br>
/repositories/:repository_id/<wbr>pulls      1,647   1.258%<br>
/repositories/:repository_id/<wbr>branches   1,525   1.164%<br>
<br>
Top paths:<br>
<br>
/repositories/612587/<wbr>collaborators      19,420  14.83%<br>
/repos/jenkinsci/jenkins/<wbr>contents/      10,333  7.891%<br>
/repos/jenkins-infra/<wbr>repository-permissions-updater     7,634   5.83%<br>
/repositories/1103607/<wbr>collaborators     6,273   4.79%<br>
/repos/jenkinsci/jenkins/<wbr>collaborators  6,261   4.781%<br>
/user   5,720   4.368%<br>
/       5,679   4.337%<br>
/repos/jenkins-infra/plugin-<wbr>site-api    5,117   3.908%<br>
/repositories/8263652/<wbr>collaborators     3,915   2.99%<br>
/repos/jenkins-infra/<a href="http://jenkins.io" rel="noreferrer" target="_blank">jenkins.<wbr>io</a> 3,238   2.473%<br>
<br>
Top methods:<br>
<br>
get     117,123 89.441%<br>
post    13,800  10.538%<br>
put     27      0.021%<br>
<br>
Top statuses:<br>
<br>
200     117,081 89.409%<br>
422     8,149   6.223%<br>
201     5,631   4.3%<br>
403     42      0.032%<br>
404     35      0.027%<br>
202     6       0.004%<br>
204     6       0.004%<br>
<br>
Top user-agents:<br>
<br>
okhttp/2.7.5    129,727 99.066%<br>
Java/1.8.0_92-internal  1,223   0.934%<br>
<br>
Top tokens:<br>
<br>
44790939        127,361 97.259% - <a href="http://ci.jenkins.io" rel="noreferrer" target="_blank">ci.jenkins.io</a> pipeline token (personal token)<br>
8307920 2,366   1.807% - Used by <a href="https://jenkins.ci.cloudbees.com/" rel="noreferrer" target="_blank">https://jenkins.ci.cloudbees.<wbr>com/</a> (personal token)<br>
<br>
So, it seems JIRA is no longer making requests.<br>
<br>
Still, I did notice some time periods when the account makes lots of requests -- over 5000 per hour. One such period was recently, started around 2016-12-06T15:45:59-08:00. At that point, the account started making lots of requests every minute, sometimes over 650 requests per minute.<br>
<br>
The token that was being used to make all those requests was<br>
<br>
44790939 - <a href="http://ci.jenkins.io" rel="noreferrer" target="_blank">ci.jenkins.io</a> pipeline token (personal token)<br>
<br>
and here are the top routes and paths being hit during that time:<br>
<br>
routes<br>
<br>
/repositories/:repository_id/<wbr>collaborators      2,308   47.169%<br>
/repositories/:repository_id/<wbr>contents/?*        1,894   38.708%<br>
/repositories/:repository_id/<wbr>pulls/:id  522     10.668%<br>
/repositories/:repository_id/<wbr>pulls      40      0.817%<br>
/repositories/:repository_id    36      0.736%<br>
/repositories/:repository_id/<wbr>branches   30      0.613%<br>
/       16      0.327%<br>
/user   16      0.327%<br>
/repositories/:repository_id/<wbr>statuses/:sha      15      0.306%<br>
/user/:user_id  10      0.204%<br>
<br>
paths<br>
<br>
/repos/jenkinsci/jenkins/<wbr>contents/      1,894   38.708%<br>
/repos/jenkinsci/jenkins/<wbr>collaborators  1,154   23.585%<br>
/repositories/1103607/<wbr>collaborators     1,154   23.585%<br>
/repositories/1103607/pulls     30      0.613%<br>
/repositories/1103607/branches  20      0.409%<br>
/       16      0.327%<br>
/user   16      0.327%<br>
/repos/jenkinsci/jenkins        13      0.266%<br>
/repos/jenkinsci/jenkins/<wbr>branches       10      0.204%<br>
/repos/jenkinsci/jenkins/pulls  10      0.204%<br>
<br>
For example, notice that the list of collaborators for a single repository is fetched over a thousand times within a few minutes. I'm not sure why you're doing that, but it seems wasteful and it's draining your quota.<br>
<br>
Hope this helps.<br>
<br>
Cheers,<br>
Ivan<br>
<br>
----- End forwarded message -----<br>
<br>
- R. Tyler Croy<br>
<br>
------------------------------<wbr>------------------------<br>
     Code: <<a href="https://github.com/rtyler" rel="noreferrer" target="_blank">https://github.com/rtyler</a>><br>
  Chatter: <<a href="https://twitter.com/agentdero" rel="noreferrer" target="_blank">https://twitter.com/agentdero</a><wbr>><br>
<br>
  % gpg --keyserver <a href="http://keys.gnupg.net" rel="noreferrer" target="_blank">keys.gnupg.net</a> --recv-key 1426C7DC3F51E16F<br>
------------------------------<wbr>------------------------<br>
<br>______________________________<wbr>_________________<br>
Jenkins-infra mailing list<br>
<a href="mailto:Jenkins-infra@lists.jenkins-ci.org">Jenkins-infra@lists.jenkins-<wbr>ci.org</a><br>
<a href="http://lists.jenkins-ci.org/mailman/listinfo/jenkins-infra" rel="noreferrer" target="_blank">http://lists.jenkins-ci.org/<wbr>mailman/listinfo/jenkins-infra</a><br>
<br></blockquote></div><br></div>