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

Card throws maximum retries exceeded error #2130

Closed
brundabharadwaj opened this issue Oct 5, 2022 · 27 comments
Closed

Card throws maximum retries exceeded error #2130

brundabharadwaj opened this issue Oct 5, 2022 · 27 comments

Comments

@brundabharadwaj
Copy link

brundabharadwaj commented Oct 5, 2022

Describe the bug
Unable to add top languages used to my profile

Expected behaviour
Display most used languages on my profile

Screenshots / Live demo link (paste the github-readme-stats link as markdown image)
image

Additional context
Tried accessing the provided URL to my profile as well as adding the same to my profile. Languages are not displayed as expected.
Could you please help me with this?

Thanks in advance :)
#hacktoberfest

@GorlikItsMe GorlikItsMe mentioned this issue Oct 5, 2022
@GorlikItsMe
Copy link

GorlikItsMe commented Oct 5, 2022

Same issue here
https://github-readme-stats.vercel.app/api/top-langs/?username=gorlikitsme&count_private=true&langs_count=7&hide=html&layout=compact

Edit: propably the best solution like they say here: #1471 (comment) is deploying on your own instance.

Tutorial how to deploy (for free) here: https://github.com/anuraghazra/github-readme-stats#deploy-on-your-own-vercel-instance

@Rajdave69
Copy link

same here.

@SSSDNSY
Copy link

SSSDNSY commented Oct 5, 2022

+1

@devpla
Copy link

devpla commented Oct 5, 2022

Same here

@anic4cio
Copy link

anic4cio commented Oct 5, 2022

@WillsterJohnson
Copy link

I get that we're all developers, but I don't think deploying our own clone of this app is really a solution.
If the app has a critical bug, it has a critical bug, that will only be fixed by code/deployment changes.

If [your favorite API service] went down, all hell would break loose if they said to their users "deploy it yourself".

@rickstaa rickstaa changed the title Unable to add top languages used to in GITHUB to my profile's ReadME.md Card throws maximum retries exceeded error Oct 5, 2022
@duberlyguarnizofuentesrivera

I get that we're all developers, but I don't think deploying our own clone of this app is really a solution. If the app has a critical bug, it has a critical bug, that will only be fixed by code/deployment changes.

If [your favorite API service] went down, all hell would break loose if they said to their users "deploy it yourself".

It's not really a bug. Vercel instances cost money. Donating to maintainers so they can afford more instances is the real solution here. This has been discussed a lot before. This is a service provided for free to the users, but sadly it's not free to maintain. Meanwhile, we can only wait. If your stats are critical for your repo, it's a good idea to deploy it yourself. Never depend critical functionality on free services.

#1772 (comment)

"This is likely caused by the public Vercel instance reaching one of the Github GraphQL limits. Multiple PAT tokens have been used to overcome these limits (see github-readme-stats/blob/master/src/common/retryer.js) but due to the popularity of GitHub-readme-stats, they sometimes run out. The best solution is to deploy your own Vercel instance. Please check this guide on how this is done. You can find more information on this problem in #1471. You can also use #1471 to let us know the limits are being reached."

@rickstaa
Copy link
Collaborator

rickstaa commented Oct 5, 2022

@willster277 I fully understand your frustration. This issue, however, is mostly outside our control as it is caused by the popularity of this project. This popularity has increased since #hacktoberfest 😅. As explained in #1772 (comment), we use the GraphQL API for fetching the data, but this API is rate limited at 5000 points per hour (see https://docs.github.com/en/graphql/overview/resource-limitations). The main thing we can do is add more PATs to overcome this, for this you have to be patient until @anuraghazra adds new PAT's. Because of this, we ask people to deeply their own Vercel instance to reduce the load. I also created #2121 and #2124 to mitigate the issue a bit, but we still need to review those. Hope this helps to clear up some confusion about what is causing the issue. 🤔

@FelipeFama
Copy link

Check out this link, it helped me:
https://www.youtube.com/watch?v=n6d4KHSKqGk&t=107s

@brundabharadwaj
Copy link
Author

Check out this link, it helped me: https://www.youtube.com/watch?v=n6d4KHSKqGk&t=107s
Hi Thanks for sharing the details, during deployment in Vercel facing an issue which gives an error popup stating the value of max duration is between 1 and 10 seconds and in order to increase please upgrade the plan. Can't it be done with the free version? or am I missing out something? . @anuraghazra @FelipeFama

@anuraghazra
Copy link
Owner

Hey everyone, sorry for the recent downtimes.

For the sake of transparency, we get a huge amount of requests per month (it's kind of mind boggling for a side project which I built just for fun). Here's the vercel dashboard statistics:

image

As you can see even with 73% of the responses being cached by vercel the amount of live requests are huge, and the bottleneck here is Personal Access Tokens

Each PAT have 5000 points, and based on the complexity of the GraphQL query & resource limitations set by GitHub, it's actually very very low considering that amount of requests.

To circumvent the issue, we currently have 7 PATs (thats 35k points) which sometimes get exhausted.
Thanks to @rickstaa we are going to add few more probably bumping it up to 10 or 12, hopefully that could help alleviate the downtimes.

Note: That these downtimes are temporary, and only lasts for 1hour, since PATs regenerate after 1 hour


So whats the idea way?

#1471 (comment)
Deploy on your own vercel instance. WHY?
It's easy to do, free & reliable.

  • It reduces loads on our vercel instance.
  • Your own PAT will give you more concrete stats including private stats
  • It ensures that there won't be any downtime on your profile stats because you are the only one who is gonna hit your URL

@anuraghazra
Copy link
Owner

anuraghazra commented Oct 6, 2022

Hi Thanks for sharing the details, during deployment in Vercel facing an issue which gives an error popup stating the value of max duration is between 1 and 10 seconds and in order to increase please upgrade the plan. Can't it be done with the free version? or am I missing out something? .

@brundabharadwaj sorry for that inconvinence

Yes you can fix this for free.

I'm assuming you already forked github-readme-stats on your github, so all you have to do is edit the vercel.json and set "maxDuration": 10 on your end and deploy.
https://github.com/anuraghazra/github-readme-stats/blob/master/vercel.json#L5

@brundabharadwaj
Copy link
Author

Thanks for the help @anuraghazra . will try it it out!

@brundabharadwaj
Copy link
Author

Hi Thanks for sharing the details, during deployment in Vercel facing an issue which gives an error popup stating the value of max duration is between 1 and 10 seconds and in order to increase please upgrade the plan. Can't it be done with the free version? or am I missing out something? .

@brundabharadwaj sorry for that inconvinence

Yes you can fix this for free.

I'm assuming you already forked github-readme-stats on your github, so all you have to do is edit the vercel.json and set "maxDuration": 10 on your end and deploy. https://github.com/anuraghazra/github-readme-stats/blob/master/vercel.json#L5

Hi @anuraghazra , following with the previous discussion, deployment was successful after modification of json file. But the issue persist even after adding my own domain generated. Please let me know if any other details are required from my end .

@rickstaa
Copy link
Collaborator

rickstaa commented Oct 7, 2022

@brundabharadwaj Did you create a PAT and add it to your Vercel instance as explained in the documentation?

  1. Create a personal access token (PAT) here and enable the repo permissions (this allows access to see private repo stats).
  2. Add the PAT as an environment variable named PAT_1 (as shown).

image

@brundabharadwaj
Copy link
Author

brundabharadwaj commented Oct 7, 2022

@brundabharadwaj Did you create a PAT and add it to your Vercel instance as explained in the documentation?

  1. Create a personal access token (PAT) here and enable the repo permissions (this allows access to see private repo stats).
  2. Add the PAT as an environment variable named PAT_1 (as shown).

image

@rickstaa yes I did. followed https://www.youtube.com/watch?v=n6d4KHSKqGk&t=107s as mentioned by @FelipeFama . Still it's failing. Between are you suggesting that it name specific ? as 'PAT_1' No I guess :)

@rickstaa
Copy link
Collaborator

rickstaa commented Oct 7, 2022

@brundabharadwaj Strange. Can you maybe share your deployment URL?

@brundabharadwaj
Copy link
Author

brundabharadwaj commented Oct 7, 2022

@brundabharadwaj Strange. Can you maybe share your deployment URL?

@rickstaa sure, here are the urls
github-readme-stats-brundabharadwaj.vercel.app

·
Automatic URL

Learn More
github-readme-stats-git-master-brundabharadwaj.vercel.app
·
Automatic URL

Learn More
github-readme-stats-beta-ten-25.vercel.app
·
Custom Domain

Thanks for your time!

@rickstaa
Copy link
Collaborator

rickstaa commented Oct 7, 2022

@brundabharadwaj I checked your deployment, and it looks like the PAT_1 variable is not added to the Vercel instance or that it does not have the right permissions. Please ensure that you completed all the steps under the hammer_and_wrench Step-by-step guide on setting up your own Vercel instance subsection of the https://github.com/anuraghazra/github-readme-stats#deploy-on-your-own-vercel-instance section. I followed these steps myself to be sure our documentation is still up to date, and I had no problems deploying my own Vercel instance.

image

@brundabharadwaj
Copy link
Author

brundabharadwaj commented Oct 8, 2022

@rickstaa Yes, tried deploying again and things are as expected now!
Thank you.
But when I click on the image, page what is see is blank! May I know the reason behind it?
image

@rickstaa
Copy link
Collaborator

rickstaa commented Oct 8, 2022

@rickstaa Yes, tried deploying again and things are as expected now! Thank you. But when I click on the image, page what is see is blank! May I know the reason behind it? image

Great to hear! I checked your instance and for me, it is working correctly:

Anurag's GitHub stats

[![Anurag's GitHub stats](https://github-readme-stats-brundabharadwaj.vercel.app/api?username=rickstaa
)](https://github.com/anuraghazra/github-readme-stats)

Maybe your theme settings cause the card to be fully black.

@rickstaa
Copy link
Collaborator

rickstaa commented Oct 8, 2022

Let's track this on #1471 again.

@rickstaa rickstaa closed this as completed Oct 8, 2022
@AtanasovaVanya
Copy link

I followed the suggestions by @rickstaa and everything works as intended now. Thanks!

@YulietM
Copy link

YulietM commented Jan 6, 2023

hi
they should only add a variable increasing the token's

This is what I had with the error:
<a href=""> <img align="center" src="https://github-readme-stats.vercel.app/api/top-langs/?username=YulietM&theme=react&line_height=40&hide=css"/> </a>

and adding (sigma-five) so it was solved:
<a href=""> <img align="center" src="https://github-readme-stats-sigma-five.vercel.app/api/top-langs/?username=YulietM&theme=react&line_height=40&hide=css"/> </a>

@turrnut
Copy link

turrnut commented Jan 13, 2023

same issue

oskar-anderson added a commit to oskar-anderson/oskar-anderson that referenced this issue Jan 25, 2023
rricamar added a commit to rricamar/rricamar that referenced this issue Feb 16, 2023
@glaucia86

This comment was marked as outdated.

@rickstaa
Copy link
Collaborator

FIY: easy solution

https://gh-stats-gen.vercel.app/

@glaucia86 Thanks for your input, but I think that site needs to offer a solution. It also uses the public Vercel instance (i.e. https://github-readme-stats.vercel.app). It looked like it was fixed in your cause because the syntax the site returned differed from what was already cached. As a result, the stats were retrieved again when the rate limits were not active anymore. The best solution is to deploy your own Vercel instance.

see7e added a commit to see7e/see7e that referenced this issue Aug 21, 2023
[Issue](anuraghazra/github-readme-stats#2130) with Card throws maximum retries exceeded error
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