question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Limit Requests to Avoid 429 Exception

See original GitHub issue

At 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:closed
  • Created 4 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Danc2050commented, Dec 3, 2019

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.

0reactions
cleanunicorncommented, Feb 2, 2020

I’ll close this until there’s more activity.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found