wakatime / jetbrains-wakatime

IntelliJ IDEA, PyCharm, RubyMine, PhpStorm, AppCode, AndroidStudio, Goland, Rider, & WebStorm plugin for quantifying your coding.
https://wakatime.com/intellij-idea
BSD 3-Clause "New" or "Revised" License
1.13k stars 167 forks source link

Wakatime hitting GitHub API rate limit #151

Closed ndench closed 3 years ago

ndench commented 3 years ago

I've been using Wakatime in PhpStorm and connecting to my GitHub account for more than 3 years now. However just recently I've noticed that my GitHub account has been hitting the API rate limit quite frequently. After resetting all my passwords and tokens and having the issue still occur, I contacted GitHub support. They let me know that the Wakatime oauth app is consistently using 95% of my GitHub API rate limit. Here is their response:

Here are some stats for the last 24 hours of API traffic from your user account:

User_Agent

WakaTime/1.0.0  55,114  95.994%
zube    1,856   3.233%
php-github-api (http://github.com/KnpLabs/php-github-api)   404 0.704%
Hub 2.14.2  19  0.033%
Composer/1.10.13 (Linux; 4.4.0-187-generic; PHP 7.4.10) 13  0.023%
octokit.js/16.28.7 Node.js/12.16.1 (Linux 4.19; x64)    4   0.007%
ansible-httpget 3   0.005%
Faraday v1.0.1  1   0.002%

Top API Endpoint

/repositories/:repository_id/pulls/:pull_number 24,280  42.289%
/repositories/:repository_id/pulls/:pull_number/commits 23,658  41.206%
/repositories/:repository_id/issues/:issue_number/comments  6,516   11.349%
/repositories/:repository_id/issues/:issue_number/events    827 1.44%
/rate_limit 593 1.033%
/repositories/:repository_id/issues 581 1.012%
/repositories/:repository_id/commits    218 0.38%
/repositories/:repository_id    174 0.303%
/repositories/:repository_id/assignees  150 0.261%
/repositories/:repository_id/labels 150 0.261%

Request_Method

get 57,378  99.937%
post    26  0.045%
patch   10  0.017%

From the notes above, you'd observe that 95% of your requests belongs to an OAuth App called WakaTime - It also explains the cause of rate limit.

I'm using:

ndench commented 3 years ago

Actually, I've disabled the Wakatime PhpStorm plugin a few hours ago, but my rate limit is still exhausted. So I think it's actually the Wakatime web application. I've disconnected my GitHub account to see if that solves it.

alanhamlett commented 3 years ago

This is fixed now. It was our website backend syncing repos, commits, and issues too quickly when the GitHub integration was connected.