I am using Hyperledger sawtooth, in which I am storing transactions and simultaneously I am reading transactions as well.
But at some points of time I am getting error of "Request failed with status code 429" and some batches are rejected.
Is anyone faced similar issues? Do you find any alternate solution for it?

- 706
- 8
- 18
-
Hope this helps you https://sawtooth.hyperledger.org/faq/rest/#what-does-this-error-mean-request-failed-with-status-code-429 – Arun Aug 11 '20 at 14:44
-
@Arun The URL you gave is just stating same error and not a alternate solution or resolution I find there. – Raj Aug 12 '20 at 15:18
1 Answers
Let's understand the problem you are facing (the what/why/how part):
Hyperledger Sawtooth rejects the client requests with the code 429 if it finds that there are too many requests. The validator maintains the statistics of how many blocks are being produced, how many transactions are flowing in to it and predicts how many transactions it can process in a given internal. In other terms if you start receiving the error code 429, it indicates that your validator thinks it has enough transactions to process. This would save the validator from overwhelming requests.
Possible solutions: (these are just a couple of pointers out of many possibilities)
Limit the client transaction rate: Proxy the client requests, put a retry mechanism to send the transactions to the validator. If your proxy layer finds that the validator is full, let it cache the requests coming in from the client.
Disable backpressure handler from the validator. I am not aware of any flag for it. I have seen people doing it and figuring out that it is not a good idea.
Hope you find a solution that works best for you, happy to learn what solution worked for you

- 592
- 3
- 13
-
Thank you @Arun, your answer helped me to find the correct path to resolve my problem. I've added some wrappers on top of the sawtooth message sending and created an intelligent mechanism to wait and send the next batch of transactions to sawtooth when it is required and can be consumed by sawtooth. – Raj Dec 10 '20 at 07:00