A transaction may go unconfirmed indefinitely.
The order wherein transactions are confirmed is determined by miners, and usually they are going to be incentivized to incorporate solely the very best fee-rate transactions, to maximise their income.
Even a low fee-rate transaction might ultimately verify, as soon as the mempool clears out. However there isn’t any assure of this, if the mempool is full for an prolonged time frame, many nodes might drop the bottom fee-rate transactions from their mempool, to release reminiscence assets (in any other case, you may DoS assault the community by publishing infinite low-feerate transactions).
In the end, when you publish a transaction to the community, you can’t be sure if or when will probably be confirmed, till it’s. By paying a excessive fee-rate, you may assist improve the possibilities you will notice a fast affirmation. Alternatively, a low fee-rate transaction might by no means be confirmed, as ultimately all nodes might ‘overlook’ about it.
If in case you have been ready a very long time for a transaction to be confirmed, you may publish a brand new transaction that spends the identical output, however with the next price. You will have to power your pockets to overlook the outdated transaction so that it’s going to craft a brand new one (eg bitcoin-cli abandontransaction "txid"
when utilizing bitcoin-core), however not all wallets will embrace this performance.