Hello,
When pinging an ICP main net canister from client side using dfinity/agent-js, at specific time intervals to fetch updated data, it responds correctly for the first few calls, but then starts throwing errors :
Expected to find result for path subnet, but instead found nothing.
AgentReadStateError: Caught exception while attempting to read state: terminated
and
[cause]: SocketError: other side closed
at TLSSocket.onSocketEnd (node:internal/deps/undici/undici:8994:26)
at TLSSocket.emit (node:events:531:35)
at endReadableNT (node:internal/streams/readable:1696:12)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
code: 'UND_ERR_SOCKET'
What’s the issue behind this? Also, what’s the best way to ping canisters for updated data from client side?