Why is my synchronized NIS server fails on a this API call when the same API on supernode succeeds

I am playing with NEM api and trying to find all the transactions which were sent to some particular address. To do this I basically invoke a account/transfers/incoming in a loop.

Everything works fine when I connect to some supernodes, but when I try to do the same on my local NIS server I get an error after some iteration.

Here are the APIs that were invoked:

The last call fails with an error: {"timeStamp":83480913,"error":"Bad Request","message":"Neither transaction id was supplied nor hash was found in cache","status":400}. But completely the same request to a NEM supernode returns everything with no problem.

My NIS was installed yesterday (also I am not sure whether I have followed a correct tutorial), and it is fully synced (not sure how to actually test it by /chain/height returns the same number calling my NIS and a supernode.

So, what is going on here and how can I fix it?

a standard NIS just keep 36 hours of transaction hashes in memory. The one you used has a changed config in order to keep all hashes in memory. If you would like to do the same with your local NIS, change the following entry in the file config.properties (and restart NIS afterwards):

nis.transactionHashRetentionTime = -1

Generally we recommend to use the id field for iterating through the transactions, every NIS can do that.

1 Like