-
Notifications
You must be signed in to change notification settings - Fork 57
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
bug: nwaku disconnects every 10 minutes #2116
Comments
Is there any traffic in the topic that your node is running? If not, then it would be expected to drop innactive connections every 10 minutes. We have the |
I tried Anyways I don't mind it working either way, but it would be good if |
The jswaku-nwaku connection is being closed because there is no activity. I would consider this the desirable behaviour, but we will look into it. The filter protocol has a ping that may help here nwaku/waku/waku_filter_v2/rpc.nim Line 15 in a0033df
In any case, note that waku is a peer to peer protocol, so single peers don't matter. What matters is that you have a set of healthy peers that can be used for your needs. Peers can disconnect from you at any time due to different reasons i) max capacity reached, ii) you are missbehaving, iii) unused connetion, etc. So you shouldn't rely on just one peer. But well, again all this should be abstracted away by the waku sdk, so we may need some modifications in there. Thanks for the report, we will get back to you. |
Issue discussed during nwaku pm call 2023-10-10. |
Proposed fix in js-waku: waku-org/js-waku#1647 |
Problem
I was investigating connectivity issues with js-waku and it turns out that
nwaku
disconnects every 10 minutes. I also tried with the latest version ofgo-waku
and it does not disconnect after 10 minutes.Impact
In client applications after a reconnection there is usually a logic to synchronize the state since the last seen message, that generally means store queries which are not strictly necessary. Also having these disconnects makes it more difficult to debug connectivity issues in general.
This is not a critical issue, but it would be nice to have the same behavior as the
go-waku
version.To reproduce
docker compose -f ./docker-compose.yaml up -d
There is a docker file below for nwaku, and another one for
go-waku
for comparison.Expected behavior
It would be nice to have the same behavior as the
go-waku
version and keep the connection.Screenshots/logs
Output of the js test app (see below), from the timestamp it can be seen that 600_000 milliseconds after the first connect event there is a disconnect event and then it automatically reconnects.
nwaku logs with debug loglevel:
nwaku version/commit hash
Using
nwaku
v0.19.0 from dockerUsing
@waku/sdk
0.0.19Testing with
go-waku
fromwakuorg/go-waku:latest
docker imageAdditional context
Test js code:
nwaku docker file (
docker-compose.yaml
):go-waku docker file for comparison:
The text was updated successfully, but these errors were encountered: