bsc
bsc copied to clipboard
WebSocket connection is systematically terminated. Starting from version 1.1.12
System information
Geth version: v1.1.14
OS & Version: Debian-1011-buster-64-minimal
Expected behaviour
WebSocket connection should never drop. In version v1.1.11
, the connection never dropped. I've been seeing this issue for a long time now. Please pay attention to this.
Actual behaviour
Starting from version v1.1.12
, the WebSocket connection is systematically terminated
Steps to reproduce the behaviour
Run the following code through PM2 (preferably multiple processes), and watch the uptime. The connection may not break immediately, but after a long time.
import { ethers } from 'ethers'
const provider = new ethers.providers.WebSocketProvider('')
provider._websocket.once('open', () => console.log('Connection opened'))
provider._websocket.once('close', () => {
console.log('Connection closed')
setTimeout(() => process.exit(1), 0)
})
I'll attach a skin where 4 processes were launched at the same time. But in some processes, the connection was broken several times. (look at the uptime)
its also happening in ipc too
thanks, the team will dig into this issue
@alexlucaci can you take a look?
Hello,
I am not able to replicate the issue, I am now running a local node and spawned 7 different instance of your node script that are connected to the node for 22 hours without any reconnects.
this error no longer persists on my side.
this error no longer persists on my side.
did you update to a newer version?
closing, looks to be resolved