massa icon indicating copy to clipboard operation
massa copied to clipboard

RPC call failing with `Client error: timeout during get_status: deadline has elapsed'`

Open BatiGencho opened this issue 2 years ago • 6 comments

I have a tokio thread which has a loop inside making rpc calls to e.g. get node status using the massa-sdk/client, the public sub-client:

tokio::spawn(async move {
        loop {
                let cfg = match client.public.get_status().await {
                  Ok(node_status) => node_status,
                  Err(e) => return Err(anyhow::anyhow!(e.to_string())),
                };
        }
    });

After some time of the code actually running, I get the following error: Client error: timeout during get_status: deadline has elapsed' as a result of the tokio timeout on the client side (see this line : https://github.com/massalabs/massa/blob/main/massa-sdk/src/lib.rs#L82 ) which is currently set to 10 secs.

The current labnet version I am getting is: Version { instance: ['L', 'A', 'B', 'N'], major: 0, minor: 10 } from rpc and it corresponds to the explorer one too: Testnet version: LABN.0.10

I can only explain it as it being caused either by:

  • a rate limiting
  • some ip blocking
  • ddos attack protection
  • Node Rpc server issues

BatiGencho avatar Sep 22 '22 10:09 BatiGencho

@damip @AurelienFT Maybe NGINX settings if there is one sitting in front of the node/s ??? I guess @qdrn can also check that here ? Thanks

BatiGencho avatar Sep 22 '22 10:09 BatiGencho

@BatiGencho your loop is calling get_status non-stop without delay ?

damip avatar Sep 22 '22 12:09 damip

For info, the labnet is currently running 14.6, we should update it to 14.7

damip avatar Sep 22 '22 12:09 damip

AFAIK there is no rate limiting on the labnet server. Can you provide a bit more details ? Does it work for a while and then it doesn't ? How can we reproduce the issue ?

qdrn avatar Sep 22 '22 12:09 qdrn

For info, the labnet is currently running 14.6, we should update it to 14.7

There is no difference between 14.6 and 14.7 but as soon as there is an update we could

AurelienFT avatar Sep 22 '22 13:09 AurelienFT

@AurelienFT I added some now, but it was without before. I am inspecting it to see if it will fail again.

BatiGencho avatar Sep 22 '22 16:09 BatiGencho

@BatiGencho do you still have this error or we can close ?

AurelienFT avatar Nov 23 '22 19:11 AurelienFT