Closed madMAx43v3r closed 2 months ago
This happens with every peer? A log like this can happen if the peer disconnects. We used to recommend this early on when weight proofs took longer to validate and the timeout worked. Can u debug further to see if the 360 timeout isn't being honored in the code. It may take some time for an engineer here to get a "dialup" connection to test.
Maybe the issue is the lack of traffic on the websocket causing it to disconnect. Do you have a proxy running that would disconnect a silent connection.
Max, in server.py
there is a function start_client
- maybe experiment with some different heartbeat
settings here - it's not configurable in config.yaml, only in the code
ws = await session.ws_connect(
url,
autoclose=True,
autoping=True,
heartbeat=60,
ssl=self.ssl_client_context,
max_msg_size=max_message_size,
)
Yes it happened for many hours with every peer it tried. Always 90 sec timeout, response None
.
I checked the code but I could not find any path where it could possibly return None
...
I don't think the connection was idle, it was probably downloading the weight proof, just too slow.
You can try it with using your phone via USB tethering. The phone is acting as a router in this case. I had no issue downloading chia blockchain releases from github, which are 200 MB. So I don't think my phone was somehow killing connections.
The log also shows that the wallet banned the peer, it didn't disconnect.
@emlowe If that's the issue, then it's probably on the server side, since the ping message from the server would not be received in time for the client to send back the pong.
While my wallet is busy receiving the weight proof, the server side ping would be stuck in the send queue.
The server code doesn't set any of those parameters though - so tweaking them on the client should change the behaviour of the connection in general - the server code uses all aiohttp defaults for the most part.
I might try setting heartbeat=None and/or setting it very high
You are right that I would expect some other log entries though if the connection was being closed abnormally - so I'm very unsure it will change anything for you
Oh I see now, send_request()
does return None
in case asyncio.wait_for()
returns without receiving the response first.
This issue has not been updated in 14 days and is now flagged as stale. If this issue is still affecting you and in need of further review, please comment on it with an update to keep it from auto closing in 7 days.
This issue was automatically closed because it has been flagged as stale, and subsequently passed 7 days with no further activity from the submitter or watchers.
What happened?
When trying to sync the node over a slow mobile network, it's unable to receive any weight proof in time.
It always fails with
RuntimeError: Weight proof did not arrive in time from peer
after around 90 seconds, even though the timeout has been set to 360 seconds (default value), as shown from the debug output.Speedtest without node running:
However when downloading from
github.com
I'm only getting around 200 KB/s (~1.5 MBit/s).Speedtest to Germany (from Thailand) on TCP 8444:
Also I'm not too far behind:
Version
2.3.0 / 2.3.1 (same issue on both)
What platform are you using?
Linux
What ui mode are you using?
CLI
Relevant log output