Make a staticman app instead of staticmanapp to avoid reaching quotas
See original GitHub issueThe public instance of Staticman is in trouble: API calls are now regularly hitting the Github quotas of 5000 hits per hour per user.
The issue is that every comment on any site using this instance is going through the staticmanapp
user, therefore staticmanapp
easily reaches its API quotas.
This causes the problems that have been repeatedly mentioned in #227, #222, or #242 for example.
I got in touch with the Github staff about this and here’s their recommendation:
instead of using a single account to make all those requests, you should build an app so that your users can authorize/install the app. That way, the rate limits will scale much better – for OAuth Apps, each user has their own quota and for GitHub Apps each installation has its own quota. So, your total rate limit would scale with the number of users instead of being static, which is what you want – you want the limits to grow with your userbase.
@eduardoboucas you know your software - would this be possible?
Issue Analytics
- State:
- Created 5 years ago
- Reactions:13
- Comments:68 (16 by maintainers)
Top GitHub Comments
Hi all.
I had a go at implementing Staticman as a GitHub App, which should fix many of the issues people are seeing at the moment. Can I ask for some volunteers to help me test it? Here’s how:
staticmanapp
as a collaboratorv3
endpoint, usingdev.staticman.net
as the base URL – i.e. https://dev.staticman.net/v3/entry/github/[USERNAME]/[REPOSITORY]/[BRANCH]Any help is much appreciated.
Hi everyone. I’m sorry that some people are frustrated with the project, I can relate to that. But please remember that the code is fully open-source, which means anyone can simply run their own instance, with their own GitHub account, and bypass all these limitations. The issue we’re seeing here is really a problem with the free, public instance I decided to host for everyone. In hindsight, this probably wasn’t the best of ideas, because it puts pressure on me to be the sole gatekeeper of this service.
I’ve not abandoned the project and I’m thinking of solutions to solve both problems: the problem that a single GitHub account acting on behalf of everyone isn’t maintainable, and the problem that in the current scheme of things, where the public instance that I run is the centrepiece of the project, I represent a bottleneck.
For example, I’m keen on the idea of rebuilding Staticman as a Netlify function, so that effectively everyone is running their own instance (for free) rather than relying on a centralised service (which I’m covering the costs for). In this scenario, people would provide access to their own GitHub account, which commits would be made from, thus removing the issue of quota limits.
All I can say is that your patience is much appreciated and I’d love to hear everyone’s thoughts on how we can make this more manageable for everyone.