-
Notifications
You must be signed in to change notification settings - Fork 5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
One particular block cannot be read over websocket: "CONNECTION ERROR: Provider started to reconnect" #4016
Comments
Update: After some testing I have found that this only occurs on that particular block!
I have not found any other block with this same issue. As well as happening in web3@1.2.11 it also happens in the latest version web3@1.3.5 Of course it only happens with websocket connections, not http connections. This seems like a bug. Does it happen for you too? |
Thank you for bringing this to our attention, if the troublesome block isn't a necessity for you, then I would put this as a medium severity bug, and we'll work on it when we have the availability That said, I will keep this issue in mind during the rewrite ( |
@joeytwiddle Are you able to show the logs on your node when this call is made? |
For what it's worth, we seem to be getting the same behaviour with block 12467716. I don't see anything special in the geth node logs. Just the usual "Imported new block headers". We have light and fast nodes. It takes about 1.3 seconds to receive this error from these "unhealthy" blocks. That is the same time it usually takes to get a response from the healthy blocks too. Yes, there is a workaround (use http instead of ws) so this bug isn't too severe. I'll be happy to check if the behaviour is fixed or recurring in future releases of web3. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions. If you believe this was a mistake, please comment. |
Hi everyone! Increasing the @joeytwiddle since you are passing The
More on config options here: https://web3js.readthedocs.io/en/v1.5.0-rc.0/web3.html#configuration |
Thank you so much for tracking down the cause! It's good to know there was a logical explanation. Ideally web3 could improve this error message. Instead of "CONNECTION ERROR", a message like "Response exceeds maxReceivedMessageSize" would make it easier for the consumer to understand and address the problem. Of course, I've no idea if that's easy to code or not! It looks like this error comes from the |
Note: I tried with gabuladze's suggestion above (used some even larger values) but the error still pops up sometimes. So we just gave up on using |
same problem |
Could we document the various reasons why this error may occur? To help developers who experience this to debug their issue.
We saw this error once in the past, when our light node had crashed/frozen (due to running out of disk space). The solution that time was to bring back the node, and restart our app. (Perhaps discarding the old web3 provider and creating a new one would have been sufficient, instead of a full restart, as suggested in another issue.)
However today we had it again, and chronically. We could create a new provider and connect, and successfully request the client version and block height. But then, sometimes within 1 second of connecting, we would get this error.
This was happening on both light and fast nodes. Restarting them, and upgrading from 1.10.1 to 1.10.2 didn't help.
We have been using web3 v 1.2.11 for 6 months, but this is the first time seeing this happen. Edit: It also happens with web3 v 1.3.5.
We can actually make the following requests without any error:
But the error was triggered when we try to fetch the block data:
This was the error we received:
What could be the cause this time?
To get the service working again today, we switched from
ws://
tohttp://
and that worked without issue.In general, what are the various reasons this error might occur, and how can we test or solve each one? Thanks!
The text was updated successfully, but these errors were encountered: