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.

Can support wait for a moment before retries

See original GitHub issue

https://github.com/elastic/elasticsearch-py/blob/1cae2b7eb0324c133be76a18e01a58d2b17485c0/elasticsearch/transport.py#L332

if attempt == self.max_retries:
    raise
else if self.retry_wait:
    time.sleep(self.retry_wait)

I use AutoSSH tunnel to connect to es, the network is sometimes unstable, will disconnect for a few seconds, and then automatically restore.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
fnavarrogonzalezcommented, May 17, 2018

A little improve over the solution of @vc1 could be instead of an linear retry, start with a lower value and increase it in every iteration (poly/exp).

0reactions
fxdgearcommented, May 18, 2018
Read more comments on GitHub >

github_iconTop Results From Across the Web

What is the optimal retry wait time? - MSDN - Microsoft
In this case, we highly recommend that your client code back off and wait before retrying. This will give the system some time...
Read more >
Be a good client: retries. When a request to a server ... - Medium
In this case, a maximum threshold for the waiting time between retries before informing the end-user of the failure.
Read more >
Retries and Timeouts | Linkerd
Once requests are retried a certain number of times, it becomes important to limit the total amount of time a client waits before...
Read more >
Timeouts, retries and backoff with jitter - AWS
The preferred solution that we use in Amazon is a backoff. Instead of retrying immediately and aggressively, the client waits some amount of...
Read more >
Retry-After - HTTP - MDN Web Docs
The Retry-After response HTTP header indicates how long the user agent should wait before making a follow-up request.
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