You might come across this error from time to time-32005: Node is behind by xxx slots
The transaction(s) don’t go through, and this error is thrown when a node is unhealthy (not at the tip of the chain).
- Your request is routed to our load balancers which forward you to the validator nodes immediately
- We periodically check if the nodes are healthy or not by calling the
getHealth
method. Unhealthy nodes are removed automatically
That being said, thegetHealth
method is not always a reliable way of checking, which results in unhealthy nodes being present in our infra.
You can check the Solana network whenever the issue appears:
- Solana Grafana Metrics
- TPS and Average Ping Time; Low TPS, High ping time will lead to instability in the Solana network.
- This also has the side effect of having some 503s on the user side, as the available capacity is lower for queries.
- Whenever it spikes, that means that the Solana network packages are not being received correctly by peers, and thus the network starts to slow down and can even stall.
At that time, the validators try to recover the connection as soon as possible and dedicate most of their resources to that.
Solution:
- Add a
maxRetries
to your code (const tx = await this. connection. sendRawTransaction( encodedTx, { maxRetries: 5, skipPreflight: false }, );
) - Implement a retry mechanism yourself. Catch the error, wait for x amount of time and retry the tx
We also have a guide available to handle dropped transactions
Comments
0 comments
Article is closed for comments.