ScanAll method exception C# client

Hi, I’m getting the following exception when I try to run ScanAll() method from C# client to retrieve all the records given namespace and set. It is printing the records but the exception is thrown at the end. Any idea why this is happening?

Error -11,6,1000,1000,5: Max retries exceeded: 5

Any help is appreciated!

ScanAll() requests/tracks all 4096 partitions. If some partitions were not received, the scan retries those partitions. If 5 retries fail, then an exception is thrown.

Since records were returned, some partitions requests did succeed, but others failed. Some reasons for failure include:

  1. One of the nodes in the cluster is unreachable from the client side.
  2. Timeouts are consistently occurring. This is the likely cause since your timeout is just 1 second for a scan.

Thank you Brian for the reply. I ran ScanNode method on each node and it is returning results so I think nodes are reachable. I tried to set Timeout in ScanPolicy to 2000 (policy.SetTimeout(2000)) but still getting the error. Is there any other way to change the timeout? Thank you

Try the ScanPolicy default which is socketTimeout = 30000 and totalTimeout = 0 (no total timeout).

Thank you for the reply! Unfortunately that also didn’t work

Add the following to, line 65, recompile the client and retest.

Log.warn("Scan command failed: " + ae.getMessage());

If you are not subscribed to the Aerospike log (Log.setCallback() not called), then you could use standard print line instead:

System.out.println("Scan command failed: " + ae.getMessage());
© 2021 Copyright Aerospike, Inc. | All rights reserved. Creators of the Aerospike Database.