-
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
websocket issues: connection not open on send() #1965
Comments
We had a similar issue and it had to do with the Ethereum Node that we were running and not with web3.js. Troubleshooting revealed that we had malconfigured our nodes. Are you running a local node or connecting to infura? Are you running a parity node or geth? Are you sure that you enabled websockets properly? |
I ran Infura when this happened. The websocket configuration was as follows:
|
Then it is probably an issue with Infura. See: INFURA/infura#97 (comment) Try to run your own node and connect to this (this is recommended anyways). |
Just a general observation is this has been happening for a very long time now so I think it's some deliberate policy with the websockets. I'm no expert but the wss://mainnet.infura.io/_ws is better usually than wss://mainnet.infura.io/ws and is a lot faster too it seems. Is there any other one we could be using instead? One thing nobody mentioned is that if the IP address is changed (via VPN extension in chrome browser, for example) then it starts working again straight away which is why it must be some IP blocking system when too much is requested from one IP. |
This should be fixed with the new WebsocketProvider I've implemented in #2000. I will release it with the version beta.38. |
@nivida Still, experience this error on beta.54 |
In regards to this issue still persisting on I am having to restart my server almost daily as it seems to get overloaded and repeatedly get the error My server constantly calls I just changed it to I figure I will just go back to using |
Is this going to be addressed? |
This is still an issue in v1.2.1 - |
Also seeing this on v1.2.1 |
Please open this issue! The problem is still existing! We have on https://1inch.exchange the same problem! |
Also seeing this on v1.2.1 with wss://ropsten.infura.io/ws/v3/ |
@jgitgud I had to upgrade to 2.0.0-alpha1 as a workaround until this is fixed |
Thanks @conscott. I've managed to get around this issue by re-instantiating web3 on failed sends and pinging the connection with |
same issue on v1.2.2 "wss://mainnet.infura.io/v3/" |
any luck on this? |
Let's go fix it plz :) :) |
@jack75015 @caa1982 the PR is on the way for 1.x: #3190 |
This is still an issue, even with #3190. I am currently on |
I haven't configured the provider apart from supplying a connection URL. Apologies, I wasn't aware of the reconnect option in 1.2.7-rc.0. I will try that now and update you if I see the error occur again. |
@KonDax Awesome, thank you. This feature is a little tricky to test here since it's network contingent. Would welcome any feedback about how it performs in the real world 🙂 Please feel free to open a new issue if you're still seeing drops. |
I am running
[email protected]
on Kovan + Infura.The mention issue happens only sometimes and my feeling tells me it happens more often if you didn't run the application for a longer time and then start everything.
Here is my nodejs code:
The text was updated successfully, but these errors were encountered: