Limit Requests to Avoid 429 Exception
See original GitHub issueAt times, the requests that karl makes to infura cause the following error:
ERROR:Karl:Exception: 429 Client Error: Too Many Requests for url: https://mainnet.infura.io/
<traceback object at 0x7f0edc560688>
If karl determined the minimum time it could send requests to infura without triggering the 429 error, it could work within that bound and still make progress while not halting the execution of the program entirely due to a 429 error.
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
429 Too Many Requests - HTTP - MDN Web Docs
The HTTP 429 Too Many Requests response status code indicates the user has sent too many requests in a given amount of time...
Read more >What an HTTP Error 429 Means & How to Fix It - HubSpot Blog
HTTP Error 429 is an HTTP response status code that indicates the client application has surpassed its rate limit, or number of requests...
Read more >How to Fix 429 Too Many Requests Error - Kinsta
The HTTP 429 error is returned when too many requests are made to a page within a short period of time. Find out...
Read more >429 Error – Too Many Requests HTTP Code Explained
The most common cause of the 429 error is not having enough resources to handle so many concurrent requests. For example, if this...
Read more >How to Fix 429 Too Many Requests Error Code - Hostinger
One of these HTTP codes is 429 Too Many Requests. As the name suggests, this code appears whenever someone repeatedly accesses a website...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Nice. I’ll check it out. As a short-term fix, I found that changing the value in this line to 5 also prevents the 429 error from happening thus far (Note: lower numbers could work as well, I haven’t tried). https://github.com/cleanunicorn/karl/blob/88a19bee02e9042025c23f5c313ed12261cc1bbb/karl/karl.py#L132
I’ll try and come up with a multi-threaded version and do a pull request to see if you like it. It would probably only be ~10 lines added at most.
I’ll close this until there’s more activity.