HathorNetwork / hathor-core

Hathor core is the official and reference client for operating a full node in Hathor Network.
https://hathor.network
Apache License 2.0
83 stars 26 forks source link

Websocket timeout followed (or preceded?) by CPU usage peak #343

Open luislhl opened 2 years ago

luislhl commented 2 years ago

This is some random behavior we have observed while having a few wallet-headless connected to a fullnode.

The wallets are seldomly logging Ping timeout. Connection is down... { uptime: 4.99, connectionTimeout: 5000 }.

We should investigate the reason for this, that probably lies in hathor-core, because the wallets and the fullnode in this case are running in the same network (with a ICMP ping latency of about 0.5ms).

One initial suspicion is that it may be related to CPU usage on the fullnode. We have observed a peak in CPU at the same time the wallets logged the timeout (all of them connected to the same fullnode logged this).

fullnode-cpu

tuliomir commented 2 years ago

The issue HathorNetwork/hathor-wallet-headless#173 describes some weird behaviors when a wallet-headless app is trying to communicate with a heavily stressed fullnode, under test conditions. One of those is having very long response times for keeping the fullnode's websocket on, or even triggering connection timeouts like the one described here.

Maybe there is something in common between those two issues.

jansegre commented 1 month ago

Could this be related to https://github.com/HathorNetwork/internal-issues/issues/370 ?