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.

[providers] Fallback provider hangs

See original GitHub issue

Describe the bug When using a FallbackProvider if you have an RPC that hangs, the entire request will hang even if other RPCs are returning quickly without issue.

Important usage note: this issue was reproduced with a quorum of 1 (either because there are only 2 provider URLs used, or quorum is explicitly set to 1.

Reproduction steps

import { JsonRpcProvider, FallbackProvider } from "@ethersproject/providers";

// Must use a list of URLs where one does not return quickly.
// This is the exhibited error behavior for some invalid or overloaded RPCs :(
const urls = ["http://....", "http://...."];
const providers = urls.map(url => new JsonRpcProvider(url));
const fallback = new FallbackProvider(providers, 1);
const promise = fallback.getBlockNumber();
await promise; // Hangs!

Environment: Reproducible in a node repl, difficult part is finding a URL that hangs! Using "ethers": "^5.4.6"

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:5
  • Comments:10

github_iconTop GitHub Comments

1reaction
gitpushacommented, Sep 15, 2021

We noticed the same issue

0reactions
humblecodercommented, Sep 8, 2022

Any updates on this? I’m having the same issue. Also, more detailed information overall (and perhaps even a quality recovery mechanism) would be nice.

I receive the call that timed out (e.g. method:eth_blockNumber), but no indication as to why the timeout occurred. I realize you can really only provide whatever info the node sends back, but perhaps some info on why every fallback provider failed would be useful.

Timing out (when you have 3 endpoints configured) then receiving noNetwork afterward (perpetually) while still being able to manually geth attach to every single endpoint listed (or run separate simultaneous scripts that use the same nodes) is 🤯 to say the least.

Read more comments on GitHub >

github_iconTop Results From Across the Web

The Importance of Web3 Provider Redundancy
When the main provider stops responding, the backup provider takes over. Your app has minimal to zero downtime. You might also consider using...
Read more >
Unable to set provider in web3 object - Stack Overflow
I have tried replacing App.web3Provider = new Web3.providers.HttpProvider(App.url) from the "new" version with App.web3Provider = new Web3.
Read more >
NiFi System Administrator's Guide - Apache NiFi
stop : stops NiFi that is running in the background ... The default login-identity-providers.xml includes a blank provider definition:.
Read more >
Fax Problem 3CX T38 / G771 is not supported by 3CX via ...
The SIP trunk provider is not to blame either, it is due to the 3CX ... still supports T38 we still test it...
Read more >
sssd.conf(5): config file for SSSD - Linux man page
For some ID providers there are also default regular expressions. ... to reconnect in the event of a Data Provider crash or restart...
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