Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitHub API rate limit consumed #172

Closed
juliand665 opened this issue Jul 20, 2020 · 5 comments
Closed

GitHub API rate limit consumed #172

juliand665 opened this issue Jul 20, 2020 · 5 comments
Labels
bug Something isn't working

Comments

@juliand665
Copy link

GistPad seems to send out a lot of requests to the GitHub API. I'm pretty sure this is causing language server updates for the rust-analyzer extension (which uses a single request to the GitHub API for that) to fail until the rate limit resets.

For example, just loading the extension already sends out 12 requests:
unknown
And it didn't stop there, although I didn't investigate exactly when it sends out more requests—I assume you know all about that.

I have now signed in, which makes it use the token for its requests and thus bypass rate limits, but this shouldn't have been possible anyway.

Expected behavior
Since this seems to be enough to use up the rate limit over time, it'd be nice if it at least warned that that's happening when you're not signed in, or somehow cached the results or perhaps even blocked entirely until signed in?

Desktop:

  • VS Code Version v1.47.2
  • GistPad Version v0.1.8
@juliand665 juliand665 added the bug Something isn't working label Jul 20, 2020
@robgrace
Copy link

Same here. I do have 100s of files in my repo now, so I expected to hit the limit when I first pushed those files into the repo. But now even changing 1 or 2 files seems to cause the API limit to be exceeded. Is there a background task continuously sending API requests to keep things in sync? Maybe that polling could be done less frequently, or made configurable.

@lostintangent
Copy link
Owner

Just to confirm: are you both using the repo management experience? I just want to make sure, since the rate limit shouldn't be an issue if you're simply using GistPad for editing gists.

Regarding the background sync: GistPad checks the GitHub API every 5 minutes to see if anything has changed on the server, and only if it has, will it sync those changes. The "change check" calls shouldn't count against the rate limit, so I need to look into what might be going on here.

@robgrace
Copy link

Yes, I should have clarified that this is with a Managed Repo. And it seemed to happen only after I pulled in a few hundred files. Thanks!

@juliand665
Copy link
Author

I don't even know what the repo management experience is, so I'm pretty sure I'm not using it.

@lostintangent
Copy link
Owner

This is now resolved! Let me know if you run into this problem any further. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants