Transaction not confirmed

I have placed a token transaction function into my firebase functions server and it sometimes works, but sometimes it gives this message:

Error: Transaction was not confirmed in 60.00 seconds. It is unknown if it succeeded or failed. Check signature 35KFxz9EM4zViV4UchHvWcDPqwfPgP2st4BjPst3ywgmPUK4fxhnz773JPpV3hSyh5vcXatTb8EhnqQtJKpcRZQ5 using the Solana Explorer or CLI tools.
at Connection.confirmTransaction (/workspace/node_modules/@solana/web3.js/lib/index.cjs.js:5631:13)
at async Object.sendAndConfirmTransaction (/workspace/node_modules/@solana/web3.js/lib/index.cjs.js:2962:19)

The firebase function was edited to allow 2 minutes wait for timeout so i guess the problem is with SOLANA, which was supposed to be a fast network. Is there a way to solve this?
I noticed the problem happens in this function:

					  web3.sendAndConfirmTransaction(connection,transaction,[fromWallet] ).then(signature=>{

Hi @torugor and welcome to the forum! :wave:

Usually Solana transactions will finish within well under two seconds, often less than a second, but yesterday I noticed that some transactions were getting rejected like you noticed. Today things seem to be working better again from the few transactions I submitted.

Maybe try it again and see if it’s working. I don’t think you will run into that commonly, yesterday was the first time I’ve ever had issues with it so I assume it was a temporary network issue.