question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Make a staticman app instead of staticmanapp to avoid reaching quotas

See original GitHub issue

The 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:closed
  • Created 5 years ago
  • Reactions:13
  • Comments:68 (16 by maintainers)

github_iconTop GitHub Comments

35reactions
eduardoboucascommented, Jan 13, 2019

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:

  1. Remove staticmanapp as a collaborator
  2. Go to https://github.com/apps/staticman-net and install the application on your repository
  3. Submit a comment to the new v3 endpoint, using dev.staticman.net as the base URL – i.e. https://dev.staticman.net/v3/entry/github/[USERNAME]/[REPOSITORY]/[BRANCH]

Any help is much appreciated.

25reactions
eduardoboucascommented, Dec 14, 2018

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Getting started - Staticman
Welcome! These instructions walk you through deploying your own instance of Staticman and connecting it to your static site.
Read more >
Staticman - Spinning Numbers
Spinningnumbers.org is a static web site. I use Staticman v2 as a service to make it seem like my static site is responsive...
Read more >
Add comments to Gatsby using Staticman - Oscar Alsing
Deploying a Staticman server to Heroku is easy! All you need to do is to press the "Deploy to Heroku" button found in...
Read more >
DevLifeMatter eduardoboucas.staticman
DevLifeMatter eduardoboucas.staticman. ✓ staticman Make a staticman app instead of staticmanapp to avoid reaching quotas.
Read more >
[Solved] jekyll Defaults: Path scope with subfolders - CodeAnswer
staticman Make a staticman app instead of staticmanapp to avoid reaching quotas. Hi all I had a go at implementing Staticman as a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found