LiskArchive / lisk-sdk

🔩 Lisk software development kit
https://lisk.com
Apache License 2.0
2.72k stars 457 forks source link

WS API client does not emit events #9142

Closed sameersubudhi closed 7 months ago

sameersubudhi commented 7 months ago

Expected behavior

The WS API client when connected should always emit the chain_* events.

Actual behavior

When running Lisk Service against Lisk Core (or any other application) for a prolonged duration (at least a couple of days) using the WS API client stops emitting any of the chain_* events resulting in Lisk Service being stuck in a state of limbo even while the chain continues to progress.

Steps to reproduce

Which version(s) does this affect? (Environment, OS, etc...)

v6.0.0

priojeetpriyom commented 7 months ago

Sometimes we get following timeout error when trying to automatically reinstantiate the WS API client.

2023-11-13T21:35:02.838 INFO [nodeStatus] Node synchronization in progress. Will wait for node to sync with the network before scheduling indexing.
2023-11-13T21:35:19.844 ERROR [client] Error instantiating WS client to ws://host.docker.internal:7887.
2023-11-13T21:35:19.844 ERROR [client] Could not connect in 2000ms
bobanm commented 7 months ago

The WS API client has been running against my testnet nodes for several days and it has been showing chain_* events correctly.

According to @sameersubudhi, the reported behavior could have been solved with correct re-instantiation of API client by Lisk Service in https://github.com/LiskHQ/lisk-service/issues/1920.

I will close this issue now. If the problem re-appears, please feel free to re-open it.