Open anuraghazra opened 2 years ago
@anuraghazra, I think we should also increase the retry number in the retry function.
see https://github.com/anuraghazra/github-readme-stats/pull/2121.
It's not really.
The BUG is back... I should be more clear lol
the bug is back to me
I'm also getting maximum retries exceeded!
Posting this here as a reference:
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:
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?
https://github.com/anuraghazra/github-readme-stats/issues/1471#issuecomment-979306704 Deploy on your own vercel instance. WHY? It's easy to do, free & reliable.
Originally posted by @anuraghazra in https://github.com/anuraghazra/github-readme-stats/issues/2130#issuecomment-1270624232
This bug is improved when the following PRs are merged:
Hey there, I just encountered the same error as probably most here over the last month. Just curious: What would prevent us/you/someone from hosting this on a VPS or sth? The request load doesn't seem that bad (10 requests/s) after all. Or is there no issue with vercel at all and its just the GitHub API quota being used up?
Hey there, I just encountered the same error as most here over the last month. Just curious: What would prevent us/you/someone from hosting this on a VPS or sth? The request load doesn't seem that bad (10 requests/s). Or is there no issue with vertical at all, and it's just the GitHub API quota being used up?
@cloudybyte Thanks for letting us know and for your question. There exist Vercel Limits, but we are not close to hitting these because we using caching. The GraphQL limits currently cause the PAT error (see https://docs.github.com/en/graphql/overview/resource-limitations). Hosting on another provider will, therefore, not help.
The PRs explained in https://github.com/anuraghazra/github-readme-stats/issues/1471#issuecomment-1277550011 will improve the downtime. Apart from that, the best option is hosting your own Vercel instance since you can use your own GitHub quota (see https://github.com/anuraghazra/github-readme-stats#deploy-on-your-own-vercel-instance). I'm also planning on releasing a GitHub action version (see https://github.com/anuraghazra/github-readme-stats/issues/2179). This would allow for more accurate stats, no downtime and faster loading times. I am, however, waiting on some other PRs to be merged/completed before continuing this feature.
@cloudybyte When did you encounter the error? Our downtime monitor (queries every 15 min) does not show any downtime in the last seven days.
Maybe it was down for a minimal amount of time?
Its on my profile right now...
Very strange. I don't have this error when I request your card at https://github-readme-stats.vercel.app/api?username=cloudybyte&show_icons=true&locale=en&theme=cobalt.
[![Anurag's GitHub stats](https://github-readme-stats.vercel.app/api?username=cloudybyte&show_icons=true&locale=en&theme=cobalt)](https://github.com/anuraghazra/github-readme-stats)
@cloudybyte Thanks for letting us know and for your question. There exist Vercel Limits, but we are not close to hitting these because we using caching. The GraphQL limits currently cause the PAT error (see https://docs.github.com/en/graphql/overview/resource-limitations). Hosting on another provider will, therefore, not help.
The PRs explained in #1471 (comment) will improve the downtime. Apart from that, the best option is hosting your own Vercel instance since you can use your own GitHub quota (see https://github.com/anuraghazra/github-readme-stats#deploy-on-your-own-vercel-instance). I'm also planning on releasing a GitHub action version (see #2179). This would allow for more accurate stats, no downtime and faster loading times. I am, however, waiting on some other PRs to be merged/completed before continuing this feature.
Its really not bothering me enough to set up my own vercel instance, but I wanted to improve the experience for everyone.
Very strange. I don't have this error when I request your card at https://github-readme-stats.vercel.app/api?username=cloudybyte&show_icons=true&locale=en&theme=cobalt.
[![Anurag's GitHub stats](https://github-readme-stats.vercel.app/api?username=cloudybyte&show_icons=true&locale=en&theme=cobalt)](https://github.com/anuraghazra/github-readme-stats)
Thats really strange... Its working in your comment, but broken on my profile... Thats probably sth to look into
@cloudybyte Thanks for letting us know and for your question. There exist Vercel Limits, but we are not close to hitting these because we using caching. The GraphQL limits currently cause the PAT error (see https://docs.github.com/en/graphql/overview/resource-limitations). Hosting on another provider will, therefore, not help. The PRs explained in #1471 (comment) will improve the downtime. Apart from that, the best option is hosting your own Vercel instance since you can use your own GitHub quota (see https://github.com/anuraghazra/github-readme-stats#deploy-on-your-own-vercel-instance). I'm also planning on releasing a GitHub action version (see #2179). This would allow for more accurate stats, no downtime and faster loading times. I am, however, waiting on some other PRs to be merged/completed before continuing this feature.
Its really not bothering me enough to set up my own vercel instance, but I wanted to improve the experience for everyone.
That's very nice of you help is always welcome! 🚀
Very strange. I don't have this error when I request your card at https://github-readme-stats.vercel.app/api?username=cloudybyte&show_icons=true&locale=en&theme=cobalt.
[![Anurag's GitHub stats](https://github-readme-stats.vercel.app/api?username=cloudybyte&show_icons=true&locale=en&theme=cobalt)](https://github.com/anuraghazra/github-readme-stats)
Thats really strange... Its working in your comment, but broken on my profile... Thats probably sth to look into
It could be a caching problem, but I thought I fixed it https://github.com/anuraghazra/github-readme-stats/commit/4df8094e5266f28f7367552980f4e00b0c9421a9. Maybe the header is still incorrect. Could you maybe do the following troubleshooting for me?
1) works
2) works (tested in chromium, ff is my default)
3) there is apparently no local cache for *.vercel.app
saved
That sounds a lot like a FF bug to me, if you prevented caching of errors by setting the correct response header...
- works
- works (tested in chromium, ff is my default)
- there is apparently no local cache for
*.vercel.app
savedThat sounds a lot like a FF bug to me, if you prevented caching of errors by setting the correct response header...
Thanks for the information! 💪🏻 I will check the caching headers later this week. What is a FF bug 🤓?
O I think you mean Firefox! Good to know! The caching behaviour differs per browser. I will double-check the headers.
@cloudybyte I can reproduce your error in firefox. Can you maybe check the caching headers in FF for me (see video)?
@cloudybyte One last thing that would help after you gave me the cache header information is to check if the problem goes away when you click the Disable Cache button. 🙏🏻 For me, that solves the problem, so the no-storage header is not working on Firefox.
Ooh, I think I know where the issue is and why it only works when requesting directly: GitHub seems to cache the image themselves when building the profile page. The error is probably cached on their side. Thats why requesting it directly from the vercel instance works.
Mhm, maybe not. I tried requesting my profile with Chromium and FF in private mode and both are working.
The only issue is with my non-private-mode FF (firefox-developer-edition 106.0b9 (64-bit)
to be precise)
Ooh, I think I know where the issue is and why it only works when requesting directly: GitHub seems to cache the image itself when building the profile page. The error is probably cached on their side. That's why requesting it directly from the Vercel instance works.
Great detective work! Could be the issue. I will check if the GitHub CDN respects the no-store
header.
Based on my other findings, it doesn't look like GitHub is being the issue.
Based on my other findings, it doesn't look like GitHub is the issue.
So it just works if you use the GitHub CDN URL in any other browser?
Yea
Yea
It looks like a particular Vercel + Firefox error. The card shown in https://github.com/anuraghazra/github-readme-stats/issues/1471#issuecomment-1282585613 is coming from the Vercel cache (time 15:30). I will check at the Vercel GitHub.
Yea
I think firefox is not respecting the no-cache
header then. The private mode does not store cache
Yea
It looks like a particular Vercel + Firefox error. The card shown in #1471 (comment) is coming from the Vercel cache (time 15:30). I will check at the Vercel GitHub.
Changing the error cache header to Cache-Control: no-cache, no-store, must-revalidate
might solve the issue (see https://stackoverflow.com/a/2068407/8135687).
mine's not showing the GH Stats and the Top Langs
ps: I'm using the img tag so I guess it's a caching issue like said in the upper comments!
Can you try fetching the stats directly using this url: https://github-readme-stats.vercel.app/api?hide_rank=true&show_icons=true&include_all_commits=false&count_private=true&disable_animations=false&theme=dark&locale=en&hide_border=true&custom_title=Github Stats&username=Kentakoong
and tell us which browser u're using? (Your profile is broken on my side, but fetching directly works fine...)
mine's not showing the GH Stats and the Top Langs
ps: I'm using the img tag so I guess it's a caching issue like said in the upper comments!
@Kentakoong, now it doesn't seem to be a caching issue anymore. The PATs quota for this hour has simply been used up. To decrease this occurrence, #2121 has to be merged, and some PATs have to be replaced (see #2121). I will check back in an hour.
Can you try fetching the stats directly using this url:
https://github-readme-stats.vercel.app/api?hide_rank=true&show_icons=true&include_all_commits=false&count_private=true&disable_animations=false&theme=dark&locale=en&hide_border=true&custom_title=Github Stats&username=Kentakoong
and tell us which browser u're using? (Your profile is broken on my side, but fetching directly works fine...)
You are right! Fetching directly still works, so maybe the PATs still have quota left, and this is a cached response on the server side that is still being shown from the GitHub CDN. Very strange problem.
[![Anurag's GitHub stats](https://github-readme-stats.vercel.app/api?hide_rank=true&show_icons=true&include_all_commits=false&count_private=true&disable_animations=false&theme=dark&locale=en&hide_border=true&custom_title=Github Stats&username=Kentakoong)](https://github.com/anuraghazra/github-readme-stats)
<div align="center">
<img src="https://github-readme-stats.vercel.app/api?hide_rank=true&show_icons=true&include_all_commits=false&count_private=true&disable_animations=false&theme=dark&locale=en&hide_border=true&custom_title=Github Stats&username=Kentakoong" height="150" alt="ghstats" />
</div>
[![Anurag's GitHub stats](https://github-readme-stats.vercel.app/api?hide_rank=true&show_icons=true&include_all_commits=false&count_private=true&disable_animations=false&theme=dark&locale=en&hide_border=true&custom_title=Github Stats&username=Kentakoong&safdsaf=adsfsaf)](https://github.com/anuraghazra/github-readme-stats)
<div align="center">
<img src="https://github-readme-stats.vercel.app/api?hide_rank=true&show_icons=true&include_all_commits=false&count_private=true&disable_animations=false&theme=dark&locale=en&hide_border=true&custom_title=Github Stats&username=Kentakoong&safdsaf=adsfsaf" height="150" alt="ghstats" />
</div>
@cloudybyte and @
Kentakoong It Looks like the problem at the current time only is present when the <IMG>
tag is used (see https://github.com/anuraghazra/github-readme-stats/issues/1471#issuecomment-1282690404). This, however, is, I think, a coincidence and could as well have been the other way around.
I think the GitHub CDN could still cause this caching problem. This behaviour can be seen in action if I used the cached image URL directly:
<div align="center">
<img src="https://camo.githubusercontent.com/bdc4b7001ae4db64d42b0567e58c40584162aff3cd12f250869298dafec66d78/68747470733a2f2f6769746875622d726561646d652d73746174732e76657263656c2e6170702f6170693f686964655f72616e6b3d747275652673686f775f69636f6e733d7472756526696e636c7564655f616c6c5f636f6d6d6974733d66616c736526636f756e745f707269766174653d747275652664697361626c655f616e696d6174696f6e733d66616c7365267468656d653d6461726b266c6f63616c653d656e26686964655f626f726465723d7472756526637573746f6d5f7469746c653d476974687562c2a0537461747326757365726e616d653d4b656e74616b6f6f6e67" height="150" alt="ghstats" />
</div>
To be sure, I asked a question in the Vercel repository.
@cloudybyte I think I found the problem. The GitHub CDN needs the no-cache
(see https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/about-anonymized-urls#an-image-that-changed-recently-is-not-updating). I updated the cache using the curl -X PURGE https://camo.githubusercontent.com/bdc4b7001ae4db64d42b0567e58c40584162aff3cd12f250869298dafec66d78/68747470733a2f2f6769746875622d726561646d652d73746174732e76657263656c2e6170702f6170693f686964655f72616e6b3d747275652673686f775f69636f6e733d7472756526696e636c7564655f616c6c5f636f6d6d6974733d66616c736526636f756e745f707269766174653d747275652664697361626c655f616e696d6174696f6e733d66616c7365267468656d653d6461726b266c6f63616c653d656e26686964655f626f726465723d7472756526637573746f6d5f7469746c653d476974687562c2a0537461747326757365726e616d653d4b656e74616b6f6f6e67
command and now your profile is working again.
Mhm, that sounds weird. Thanks for fixing it tho. hmu if u need help or anything
Yea strange behaviour indeed the GitHub CDN should also respect no-store
header. I think 98f9045f987112bb3d4f1a0160f3e0d93ef5bd52 will fix the issues. Please feel free to comment below if it occurs again.
Just informing that the server seems to be down for a while
This bug is improved when the following PRs are merged:
- fix: fix retry max-out bug #2121: Adds support for more PATs.
- feat: improve card loading speed #2124: Speeds up initial card loading.
- feat: enable multi page star fetching for private vercel instances #2159: Removes one GraphQl function call, reducing the PAT deterioration rate.
- fix: prevent totalCommitsFetch error result from being cached #2177: Makes sure that errors are not cached.
- feat: add PAT monitoring functions #2178: Should be checked since it looks like some PATs are expired.
@HADMARINE, thanks for letting us know the instance was indeed down for about 10 minutes. @anuraghazra, can you look at the issues above if you find the time? Especially #2178 and #2159. It seems that only one of our PATs is still working. 🤔
@anuraghazra @rickstaa I'm receiving it this morning
self doing mine worked, I had to purge it though.
We are aware of the issue and actively monitoring the PATs thanks for letting us know. 👍🏻
Down here as well :(
Thanks guys!
How do you solve this..? I tried forking vercel like the readme says, but it won't solve.. I also changed the json file :'(
You need to create a GitHub personal access token, and put it in a env var called PAT_1
On Wed, Nov 30, 2022, 10:58 AM Chaeeun Ryu @.***> wrote:
[image: image] https://user-images.githubusercontent.com/48243487/204860253-14165d76-7320-40d4-a82d-a584b41d67b6.png
How do you solve this..? I tried forking vercel like the readme says, but it won't solve.. I also changed the json file :'(
— Reply to this email directly, view it on GitHub https://github.com/anuraghazra/github-readme-stats/issues/1471#issuecomment-1332466630, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQHW4PYQXZ6KQZLBC2Y6UOLWK6BS3ANCNFSM5IWV7LGQ . You are receiving this because you commented.Message ID: @.***>
Thank you so much for your reply. I followed the link in readme (https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fanuraghazra%2Fgithub-readme-stats) and it didn't solve.. Do you know how I could get personal access token and put it in a env var called PAT_1? I have no idea how I should do it..
if you have ever used git on the cmdline its basically the same thing
here`s the url to make a token: https://github.com/settings/tokens how to add an env var to Vercel: https://vercel.com/docs/concepts/projects/environment-variables
@rickstaa Is there a place we can provide you PAT tokens?
@dginovker Thanks for your offer. I, however, have more than enough we just need to add them to Vercel. 👍🏻 But most importantly, it is best if more people deploy their own Vercel instance (see https://github.com/anuraghazra/github-readme-stats#deploy-on-your-own-vercel-instance).
@rickstaa @anuraghazra this appeared again
Hi everyone, I see that all personal access tokens are currently failing, thus you will see the "Maximum retries exceeded" error.
I'm looking into the issue to figure out what caused it.
Ideally, it should be fixed in an hour when the PATs get rest.
Details
Public instance information
Explanation
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:
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 TokensEach 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.
So whats the idea way?
https://github.com/anuraghazra/github-readme-stats/issues/1471#issuecomment-979306704 Deploy on your own vercel instance. WHY? It's easy to do, free & reliable.
Originally posted by @anuraghazra in https://github.com/anuraghazra/github-readme-stats/issues/2130#issuecomment-1270624232