2

the title speaks it all. Lately, I am facing Error: Timed out awaiting confirmation on transaction too often. Be it in a devnet or in a mainnet-beta

tried out various different custom --rpc's but most of the time it just doesn't help regardless of the internet speed, enough SOLs in a wallet and even minting only 1 NFT...

I can't think of any possible scenario which could reproduce/improve this error.

Any ideas/suggestions much appreciated

Bek
  • 173
  • 1
  • 14

1 Answers1

1

If the network is bogged down or has issues, transactions may not go through, and that's to be expected. It's recommended to retry transactions if they haven't been confirmed by the time the blockhash expires.

A few options to consider:

  • customize the confirmTransactionInitialTimeout in ConnectionConfig when creating your Connection object. You can bump this up to a higher number to wait longer
  • retry if an error is returned from confirmTransaction by calling sendTransaction once again. This will fetch a new blockhash, sign the transaction again, and send it again

More information about retrying transactions at https://solanacookbook.com/guides/retrying-transactions.html

You can see information about confirmed transactions by looking at the "Solana Ping Stats" at the bottom of the Explorer: https://explorer.solana.com/?cluster=devnet

You'll see that some proportion of transactions aren't confirmed.

Jon C
  • 7,019
  • 10
  • 17
  • 1
    `customize the confirmTransactionInitialTimeout in ConnectionConfig when creating your Connection object. You can bump this up to a higher number to wait longer` - is here was a game-changer! followed both advice and I faced the error 4/10 times on average. I will accept this as an answer if there's no better argument/solution will be made. – Bek Mar 11 '22 at 13:19
  • was wondering if storage (arweave in my case) has anything to do with the error... I have noticed arweave is quite slow when there was an attempt to upload json file <15kb and it took literally more than 15mins. my internet speed is 100Mibps – Bek Mar 11 '22 at 13:25