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

500: INTERNAL_SERVER_ERROR #145

Closed
JhonnyLusonode opened this issue Jun 28, 2022 · 9 comments
Closed

500: INTERNAL_SERVER_ERROR #145

JhonnyLusonode opened this issue Jun 28, 2022 · 9 comments

Comments

@JhonnyLusonode
Copy link

Hello, i have been using this repository on my profile and right now it´s offline.

image

@spenserblack
Copy link
Contributor

Related: #141

@JhonnyLusonode
Copy link
Author

Oh it´s working right now.

Thanks :D

@spenserblack
Copy link
Contributor

I didn't actually do anything 😆
I think this might need to be investigated to at least return a better error, because something is sporadically failing. Maybe it's the GitHub token's rate limit 🤔

@ryo-ma
Copy link
Owner

ryo-ma commented Jun 28, 2022

Probably the cause is the GitHub token rate limit. Can you come up with any solution?

@ryo-ma ryo-ma reopened this Jun 28, 2022
@JhonnyLusonode
Copy link
Author

If it´s Github token then I don´t think you can find a solution for that unfortunately... (Pls correct me if i´m wrong)

@ryo-ma
Copy link
Owner

ryo-ma commented Jun 29, 2022

One way to solve this is to use Github tokens from multiple accounts to distribute the load. Or if it fails, there is a way to retry with another Token.
But it's a gray method.
https://github.com/anuraghazra/github-readme-stats/blob/86b9ad618ff57f961861987abbe45916e146f40e/src/common/retryer.js#L11

@spenserblack
Copy link
Contributor

For now, I think all that's needed is a better error message. GitHub has an API for checking the number of available requests: /rate_limit. This is a special API that will not reduce your rate limit when you use it. I think something as simple as

if (remaining < requiredRequestAmount) {
  return ErrorImageResponse; // "We cannot display <username>'s trophies right now"
}

Long term, images could be cached, but I don't think that's possible with Vercel alone. Some other tool or service would be needed.

@3kh0
Copy link

3kh0 commented Sep 8, 2022

Having this issue again!

@ryo-ma
Copy link
Owner

ryo-ma commented Sep 9, 2022

Not perfect, but greatly improves downtime.

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

4 participants