3

The following message is thrown in the logs when attempting to access my wallet:

API Validation failed: Could not complete request

1 Answer 1

2

The problem is related to the default limits encountered. Most users might be presented with a disconnected message after attempting to login. To understand why, let's review some of the code.

Here is a line statement indicating a generic message of failure.

private final static String overMaxErrorMessage = "Could not complete request";

As you see the value of this statement is listed in our log file. Let's continue on to see where this message could be thrown.

getParameterAsList method

if (paramList.size() > maxRequestList) { throw new ValidationException(overMaxErrorMessage); }

getTrytesStatement method

if (elements.size() > maxGetTrytes){ return ErrorResponse.create(overMaxErrorMessage); }

findTransactionStatement method

if (foundTransactions.size() > maxFindTxs){ return ErrorResponse.create(overMaxErrorMessage); }

When we translate the variables for these conditional test we see that:

maxFindTxs = instance.configuration.integer(DefaultConfSettings.MAX_FIND_TRANSACTIONS); maxRequestList = instance.configuration.integer(DefaultConfSettings.MAX_REQUESTS_LIST); maxGetTrytes = instance.configuration.integer(DefaultConfSettings.MAX_GET_TRYTES); maxBodyLength = instance.configuration.integer(DefaultConfSettings.MAX_BODY_LENGTH);

So we can see, the values are simply taken from our configuration file (default if nothing is overwritten). To correct this problem, simply update the default settings for some of these directives.

DEFAULT VALUES:

MAX_FIND_TRANSACTIONS = 100000
MAX_REQUESTS_LIST = 1000
MAX_GET_TRYTES = 10000
MAX_BODY_LENGTH = 1000000

Before changing, consider the performance implications to your own node.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.