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

How to solve "Maximum retries exceeded" #2415

Closed
PencilNavigator opened this issue Jan 15, 2023 · 38 comments
Closed

How to solve "Maximum retries exceeded" #2415

PencilNavigator opened this issue Jan 15, 2023 · 38 comments

Comments

@PencilNavigator
Copy link

PencilNavigator commented Jan 15, 2023

As you may see, demo service "https://github-readme-stats.vercel.app" is hitting the API Limit. Causing your stats not displaying.
(even if it's not, if too many users are using the default demo service it will happen again.)

image

How to Fix?

Well, there are 2 methods.

1. Set it up yourself using Vercel (requires some step)
2. Use URL provided by others (sometimes unreliable but easy to do)

Method 1

please check the docs, there are specific instructions for setting up.

Method 2 (Works for me)

Change https://github-readme-stats.vercel.app to another URL provided below.

here are some you can use. (These links are collected from the web)

https://github.com/PencilNavigator/readme-stats-URL/


How can i help?

Its easy! Follow the docs where there are specific instructions for setting up, and then share your Vercel URL by making an Issue Here.

If you like this post, please give a Thumbs up and a Heart below, and also star my link repository!

@EmanuelCastanho
Copy link

Thank you, this solved the problem for me.

SirIsaacNeutron added a commit to SirIsaacNeutron/SirIsaacNeutron that referenced this issue Jan 16, 2023
@xiaobinqt
Copy link

Thanks

FanwangM added a commit to FanwangM/FanwangM that referenced this issue Jan 16, 2023
@Elitedj
Copy link

Elitedj commented Jan 16, 2023

Thank you.

@Zo-Bro-23
Copy link
Collaborator

Zo-Bro-23 commented Jan 16, 2023

https://github-readme-stats.zohan.tech (by Zo-Bro-23)

@Jeffchiucp
Copy link

Jeffchiucp commented Jan 16, 2023

thanks for providing 2 different options.

Technetium1 added a commit to Technetium1/Technetium1 that referenced this issue Jan 16, 2023
bitbw added a commit to bitbw/bitbw that referenced this issue Jan 17, 2023
change github-readme-stats URL for  "Maximum retries exceeded"
issues :anuraghazra/github-readme-stats#2415 (reference)
This was referenced Jan 17, 2023
@YashIndane
Copy link

Thanks @PencilNavigator, Method 2 worked!

@CLCK0622
Copy link

https://readme-stats.clckblog.space/
by @CLCK0622 (Kevin Zhong)

@anuraghazra
Copy link
Owner

@PencilNavigator thanks for opening the issue and recommending potential solutions.

As easy it is to use URLs provided by the community members,
I will still strongly recommend just deploying it on your own Vercel instance (it's easy, fast & better) using your own PAT.

The issue with using someone else's URL is:

  1. If many people use the same URL it will again hit the limits
    • Either their Vercel instance will hit the limit in that case the person's account might get charged extra or blocked
    • Or their own GitHub PAT might get exhausted which is same as the issue happening to us
  2. If you use some other URL you won't get the bug fixes or updates to the stats card, and have to wait for them to update their fork & deploy again to get the changes. (But if you have your own fork you can do this on your own)

loganthomas added a commit to loganthomas/loganthomas that referenced this issue Jan 17, 2023
@PencilNavigator
Copy link
Author

@anuraghazra I did mention that in ”method 1". But i think not everyone wants to setup their own vercel instance.
Using a URL provided by others is way easier for most users, and thats the exact reason why the main https://github-readme-stats.vercel.app/ failed (Too many people are using it).

@CLCK0622
Copy link

CLCK0622 commented Jan 17, 2023

I think this is really a good way for helping others as well as solving this problem permanently.
What's more, as the names are provided below, others can ask them to synchronize the forks. Though not the best but also acceptable.
Looking forward to your merging this into README.

@PencilNavigator
Copy link
Author

PencilNavigator commented Jan 18, 2023

@anuraghazra Your own profile's README stats is down.
Screenshot on 2023/1/18 13:38 UTC+8
Pic

n-ce added a commit to n-ce/n-ce that referenced this issue Jan 18, 2023
CatChenal added a commit to CatChenal/CatChenal that referenced this issue Jan 18, 2023
Readme stats issue: anuraghazra/github-readme-stats#2415

Also added thanks & refs to Anura & Rick.
CatChenal added a commit to CatChenal/CatChenal that referenced this issue Jan 18, 2023
Readme stats issue: anuraghazra/github-readme-stats#2415
Also added refs to Anurag's and Rick's work.
@Zo-Bro-23
Copy link
Collaborator

@rickstaa can you please pin this issue? I keep having to reference it when answering similar issues :)

@rickstaa
Copy link
Collaborator

rickstaa commented Jan 19, 2023

@rickstaa can you please pin this issue? I keep having to reference it when answering similar issues :)

As GitHub only allows three pins, I currently do not have a way to pin it. I already pined #1471, which is meant for this problem. People, however, keep making their own issues without looking at the pins 😅.

image

@rickstaa
Copy link
Collaborator

Duplicate of ##1471.

@claudiotancredi
Copy link

I shared my personal URL in the attempt of encouraging others to deploy their own Vercel instance, not to encourage others to use mine. Since many people have started using my URL I decided to delete the Vercel instance and delete the profile README from my GitHub profile. The URL can be deleted from @PencilNavigator 's list as well, since it has no active deployment.
It's sad, anyway, that I was forced to delete my Vercel instance and I can't include stats in my profile README because most of the people think that it's easier to use my personal URL.

@Zo-Bro-23
Copy link
Collaborator

image

I agree; 300 is a lot 😟

I can't include stats in my profile README because most of the people think that it's easier to use my personal URL

You can always deploy again (and not share the URL with anyone), or use someone else's URL (feel free to use mine: https://github-readme-stats.zohan.tech)!

@claudiotancredi
Copy link

@Zo-Bro-23 I could, but my profile is pretty easy to reach, especially after I've commented on several issues regarding this topic, so the new URL could be stolen too.
Anyway, thank you for your personal URL, but I think I'll look for another solution!

@rickstaa
Copy link
Collaborator

but I think I'll look for another solution!

I had the same problem but created a new branch and ran my own cards. 👍 Anyway, we are looking to improve the GRS deployment by implementing it as a GitHub action (see #2179). This will lead to more accurate stats and better loading times and allows people to update the cards at any frequency they like. 🚀

@Zo-Bro-23
Copy link
Collaborator

People may still find it easier to use a given URL than set up an action, so we will have to come up with some creative solutions. Having multiple PATs is probably the best solution, but we have to figure out why they're getting banned by GitHub (maybe we should use real emails instead of anonymous ones).

@anuraghazra
Copy link
Owner

It's sad, anyway, that I was forced to delete my Vercel instance and I can't include stats in my profile README because most of the people think that it's easier to use my personal URL.

Yes that sucks, I've asked people in multiple issues to not use anyone's personal Vercel instance (because of obvious reasons) and instead deploy on their own.

This https://github-readme-stats-ruby-one.vercel.app/ url is @claudiotancredi's and if all of you start using it his PAT & Vercel instance will get exhausted.

#2404 (comment)

@anuraghazra
Copy link
Owner

anuraghazra commented Jan 20, 2023

@PencilNavigator

Using a URL provided by others is way easier for most users, and thats the exact reason why the main https://github-readme-stats.vercel.app/ failed (Too many people are using it).

yes agree, but the problem is the URLs provided by others won't have multiple PATs (thus only 5k API Limit) + No Vercel Pro. So these URLs are more susceptible to downtime.

While github-readme-stats's instance have more tolerance, yes it might go down but it will go backup after 1h or so.
Not to mention, personal deployed instance will have the best stability.

@anuraghazra
Copy link
Owner

@rickstaa

Anyway, we are looking to improve the GRS deployment by implementing it as a GitHub action (see #2179).

Now here's the interesting part.

Yes github-action will be a much accurate & stable solution.
But consider this, the whole reason github-readme-stats is this much popular is because of it's accessibility and ease of integration. (just paste a link and done!). People are hesitant to deploy on their own Vercel instance (even though it's just 5 clicks to deploy) thus opting for using the URLs provided by community members for the convenience it provides.

Now take this scenario, GithubAction setup will be 2x more cumbersome than just pasting a link in your readme. 😅 so it will be hard to convince people to migrate to the action.

@rickstaa
Copy link
Collaborator

rickstaa commented Jan 20, 2023

@rickstaa

Anyway, we are looking to improve the GRS deployment by implementing it as a GitHub action (see #2179).

Now here's the interesting part.

Yes github-action will be a much accurate & stable solution. But consider this, the whole reason github-readme-stats is this much popular is because of it's accessibility and ease of integration. (just paste a link and done!). People are hesitant to deploy on their own Vercel instance (even though it's just 5 clicks to deploy) thus opting for using the URLs provided by community members for the convenience it provides.

I agree that using a simple URL to generate the cards is easiest for most people. 🚀 I, however, am afraid we will get even more downtime if we grow even more. I was therefore looking to persuade people to use a different option since people are not using their own Vercel instance. 😁

My hope was that 40% more tech-savvy (or less lazy) users would switch to a GitHub action or the Private Vercel instance if it offered less downtime (and more accurate stats). In that case, we can use environment variables to enable these more accurate stats on the GitHub action (see #2159 for an example). But maybe this is just wishful thinking. 😅

Now take this scenario, Github Action setup will be 2x more cumbersome than just pasting a link in your readme. 😅 so it will be hard to convince people to migrate to the action.

If deployed on the marketplace (see #2179 (comment)), setting GRS up with this action would essentially be four easy steps:

  1. Add the action YAML script to your readme.
  2. Add a PAT to the readme (see https://docs.github.com/en/actions/security-guides/automatic-token-authentication).
  3. Wait till the action has at least run one time.
  4. Reference the generated picture URL in your readme.

@PencilNavigator
Copy link
Author

@anuraghazra With enough vercel instances in my repository, i can create a service that equally spreads the request to all links provided (load balancing for short).

The github-readme-stats URL shouldn't even be provided by you, it should be a community thing to do.

One-man's power is always not enough. Groups of people has better power.

EbrahimKaram added a commit to EbrahimKaram/EbrahimKaram that referenced this issue Jan 20, 2023
anuraghazra/github-readme-stats#2415
had an issue had to replace the default API to use
@Zo-Bro-23
Copy link
Collaborator

@anuraghazra With enough vercel instances in my repository, i can create a service that equally spreads the request to all links provided (load balancing for short).

The github-readme-stats URL shouldn't even be provided by you, it should be a community thing to do.

One-man's power is always not enough. Groups of people has better power.

We've just deployed 9 PATs. We'll see how the loads hold. Hopefully this should work fine, so we don't need to have multiple deployments. Having a single deployment is much easier to work with, and @anuraghazra also has Vercel Pro 🚀

@Zo-Bro-23
Copy link
Collaborator

@rickstaa an Action could potentially be easier than Vercel deployment!

  1. Add the action YAML script to your readme.
  2. Add a PAT to the readme (see https://docs.github.com/en/actions/security-guides/automatic-token-authentication).
  3. Wait till the action has at least run one time.
  4. Reference the generated picture URL in your readme.

We can simplify this even further.

  1. Copy-paste a provided YAML script.
  2. Add the image to your readme.
  3. Done!

As far as I know, you don't need to provide PAT tokens (unlike Vercel) since GitHub already passes these through the GITHUB_TOKEN env variable!

@rickstaa
Copy link
Collaborator

@rickstaa an Action could potentially be easier than Vercel deployment!

  1. Add the action YAML script to your readme.
  2. Add a PAT to the readme (see https://docs.github.com/en/actions/security-guides/automatic-token-authentication).
  3. Wait till the action has at least run one time.
  4. Reference the generated picture URL in your readme.

We can simplify this even further.

  1. Copy-paste a provided YAML script.
  2. Add the image to your readme.
  3. Done!

As far as I know, you don't need to provide PAT tokens (unlike Vercel) since GitHub already passes these through the GITHUB_TOKEN env variable!

@Zo-Bro-23 good point. For the action when people don't want to show private data, no PAT is needed. 👍🏻

@anuraghazra
Copy link
Owner

Having a single deployment is much easier to work with, and @anuraghazra also has Vercel Pro 🚀

Yeah Vercel isn't the bottleneck, we can still handle 8-10mil request per month. GitHub's PATs are the bottleneck which we already have 9 of them. So instead of using multiple Vercel instance it's 10x effective to add more PATs

@analuisadev
Copy link

Thank you very much, it helped me a lot

@Falcon-Br
Copy link

Worked! Thank you a lot! S2

@Cristishor201
Copy link

The usefulness of #2415 is the number of community URLs it lists. People find it much easier to choose one URL to use than to deploy and set it up themselves. Maybe consider replacing #1471 with #2415 for the pin; it's fine either way, though.

I see. I can add those URLs to the comment by @anuraghazra in #1471. I, however, think these personal instances will likely be quickly overloaded due to the popularity of this repository. 😅 I think the only way forward is to make it easier for people to deploy their own Vercel instance (i.e. #2424) or to implement #2179.

What I do not understand is why do you need a PAT in the first place, if anyone can use your instance ?
Also I am thinking if I can put my url instance in a github secrets env variable and use it as a plain html in ReadMe...

PS: I hit this error, with my own instance, so it's the others fault.

but I think I'll look for another solution!

I had the same problem but created a new branch and ran my own cards. 👍 Anyway, we are looking to improve the GRS deployment by implementing it as a GitHub action (see #2179). This will lead to more accurate stats and better loading times and allows people to update the cards at any frequency they like. 🚀

I am not an expert, but is not a way to replace the vercel app by turning this repo into a github action ?

Now take this scenario, GithubAction setup will be 2x more cumbersome than just pasting a link in your readme. 😅 so it will be hard to convince people to migrate to the action.

Well, when some people use your own instance, I think this is the best choice.

@rickstaa an Action could potentially be easier than Vercel deployment!

  1. Add the action YAML script to your readme.
  2. Add a PAT to the readme (see https://docs.github.com/en/actions/security-guides/automatic-token-authentication).
  3. Wait till the action has at least run one time.
  4. Reference the generated picture URL in your readme.

We can simplify this even further.

  1. Copy-paste a provided YAML script.
  2. Add the image to your readme.
  3. Done!

it would be so much cool, if you can make the image link can be put in an context expression like {{ STATS_URL }} or something like this, bypassing vercel app. :D

@rickstaa
Copy link
Collaborator

rickstaa commented Sep 11, 2023

@Cristishor201, I appreciate your valuable feedback and have some clarifications to address your questions:

What I do not understand is why do you need a PAT in the first place, if anyone can use your instance ?
Also I am thinking if I can put my url instance in a github secrets env variable and use it as a plain html in ReadMe...

The PAT is needed because the GitHub rate limited the GraphQL and REST APIs from which the data for the cards is retrieved (see https://docs.github.com/en/graphql/overview/resource-limitations and https://docs.github.com/en/rest/overview/resources-in-the-rest-api?apiVersion=2022-11-28).

To my knowledge, GitHub's markdown parser doesn't support dynamic content like substitution variables (see https://stackoverflow.com/a/62293645/8135687). GitHub actions are the only way to alter markdown files and inject secrets dynamically.

I am not an expert, but is not a way to replace the vercel app by turning this repo into a github action ?

We are in the process of releasing such a GitHub action. Please follow #2179.

Well, when some people use your own instance, I think this is the best choice.

My instance will also be rate-limited, sadly 😅.

@rickstaa an Action could potentially be easier than Vercel deployment!

  1. Add the action YAML script to your readme.
  2. Add a PAT to the readme (see https://docs.github.com/en/actions/security-guides/automatic-token-authentication).
  3. Wait till the action has at least run one time.
  4. Reference the generated picture URL in your readme.

We can simplify this even further.

  1. Copy-paste a provided YAML script.
  2. Add the image to your readme.
  3. Done!

I prefer to release a GRS action in a separate readme since this would prevent clustering the already long README and result in a more straightforward setup. I am already testing and using the action in https://github.com/rickstaa/rickstaa/blob/main/.github/workflows/grs.yml. I would like to release it before the end of the year 🚀.

We can, however, add these steps to #2179 so that people can already use the action. However, please be aware that #2473 has te be solved for these steps to work.

it would be so much cool, if you can make the image link can be put in an context expression like {{ STATS_URL }} or something like this, bypassing vercel app. :D

As stated above this currently is not possible (see https://stackoverflow.com/a/62293645/8135687).

Thank you for your patience and feedback as we continue improving the GitHub Readme Stats user experience. If you have any more questions or suggestions, please feel free to share them. 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests