Why is my transaction queued?
This document describes why your transactions might have a status of “queued” in your node’s local transaction pool and offers some ways that you can change that transaction’s state. The local transaction pool can hold as many pending and queued transactions as the node’s memory will allow. Please note that your node’s local transaction pool is different than the main-net transaction pool.
Diagnose via the Kaleido console
You can view the pending transaction pool of your nodes in the Metrics tab of the node details panel. If there is at least one transaction in the pending/queue pool, you can also click Download to get the full output of the txpool_content command.
Diagnose Geth Console
Here are some useful Geth Console calls to use when inspecting transactions
txpool.status: gives the number of transactions in pending and queued states
txpool.content: gives details on each transaction in pending and queued states
eth.getTransactionCount(eth.coinbase): gives the total number of validated transactions sent from a given account
eth.getTransaction(“<transaction_hash>”): gives details about a single validated transaction
If a transaction is sent with a nonce that is higher than the current transaction count for the sender’s account (creating a gap in the nonces), then the transaction will be added to the node’s local transaction pool with a queued state. The transaction will not be promoted to the “pending” state until the gap in nonces is filled and the “queued” transaction nonce becomes the next one in sequence.
NOTE: Alternatively, if the nonce of a transaction is lower than the sender’s transaction count, then the transaction will simply be discarded.
Valid transactions build-up
If blocks are not being mined at a sufficient rate to keep up with the injected transactions, then transactions can build up in the pending transaction pool. These are ready to execute, but have not yet made it into blocks. Check the chain is healthy and mining blocks, and the node that has a build-up has a good number of connected peers. If you are concerned that pending transactions are building up and your chain might not be mining blocks at a sufficient rate, please contact us with a copy of your downloaded pending transaction pool.
If a transaction stuck in the pending transaction pool can never be processed, for example because it is sending more Ether to another account than it has in its balance, then it might need to be 'rescued' before other transactions after that one can go through.
Fill in the gap
Fill the gap of nonces. For example, if the
eth.getTransactionCount(address)==5 and there is a queued transaction with nonce=7, send valid transactions with nonce=5 and nonce=6 to get the queued transaction unclogged and added to a block.
Fund your account
If a transaction is stuck because of insufficient funds, then use the Kaleido Ether Pool to send some funds to that account.
Send a rescue transaction
One way to effectively cancel a queued transaction is to send another transaction from the same account with the same nonce, but with a
gasPrice that is at least 10% higher than the
gasPrice of the original transaction. This new transaction could be one that sends 0ETH with fromAccount=toAccount so that the only cost of the transaction is its gas.
Request a clear of your transaction pool
Kaleido is able to clear the whole transaction pool of your node, via an ops request.