DenverCoder1 / github-readme-streak-stats

🔥 Stay motivated and show off your contribution streak! 🌟 Display your total contributions, current streak, and longest streak on your GitHub profile README
https://streak-stats.demolab.com
MIT License
4.66k stars 720 forks source link

"Error Fetching Resource" on camo.githubusercontent.com #618

Closed ijsbol closed 10 months ago

ijsbol commented 10 months ago

Describe the bug "Error Fetching Resource" on camo.githubusercontent.com when requesting my streak stats url.

To Reproduce This appears to only happen on my specific link; https://streak-stats.demolab.com/?user=Isabe1le

Expected behavior The streak-stats image is shown as expected.

Additional context Last time I encountered an EFR error (https://github.com/DenverCoder1/github-readme-streak-stats/issues/448) it was due to a timeout between streak-stats and the githubusercontent page. This was due to my "first" commit being in 1970. Perhaps this issue is caused due to me reaching a streak of over 270 days?

DenverCoder1 commented 10 months ago

When there is a lot of traffic to the Heroku server, the GitHub API seems to stop sending back content and the responses become very slow. If it takes too long to load, GitHub will just show a broken image instead of waiting. GitHub also caches responses on their server, so even if the speed gets back to normal, it could still show as broken on GitHub for a particular image URL for up to a few hours.

To avoid this issue, I recommend self-hosting the project. There are steps in the readme, I recently added a new method for deploying with Vercel entirely online. It's free and shouldn't take more than a couple minutes to set up.

It should also start working on its own, but there isn't much I can do to prevent it from going down in the future while hosting for over 100,000 people for free*, so self-hosting is still an option to get it to stay up more reliably.

* Scaling up to use multiple processes seems to resolve the issue but this costs about $50/month and since the project does not make any money for me and I'm not making that much from sponsorships I'd rather keep it at the lowest pricing tier. If I get at least $25/month in sponsorships, I'd keep the server scaled up.

ijsbol commented 10 months ago

Ahhh that makes sense. Thank you for the response ^-^ I'll see what I can do about self hosting :)