remix-run / remix-website

327 stars 74 forks source link

fix: revert using octokit for getRepoContent #205

Closed brookslybrand closed 6 months ago

brookslybrand commented 6 months ago

In #191 we switched from using fetching against https://raw.githubusercontent.com/ directly and instead opted to use octokit. While this was appropriate (and necessary) for the resources page, it caused a problem for our docs pages.

503 errors started showing up on the docs pages for various users

image

Inside of our Fly logs we started getting these errors

Request quota exhausted for request GET /repos/{owner}/{repo}/contents/{path}

It seems like when trying to fetch the docs it would hit octokit's rate limiting. I deployed this change to main ~45min before putting up this PR and so far errors seem to be abated

image

The only thing I'm still confused about is why this issue didn't show up sooner. Not sure if the amount of traffic we've been getting since our last announcement overwhelmed it and it was never able to recover.

Either way, we'll merge this revert in and continue to monitor.