RPC command sendfrom is giving Transaction too large error I made discord bot for fun with tips, soak and rains of altcoin. When I try to send large amount through the same bot. It is giving me "Transaction too large" error. I found the reason here: transaction creation failed

I need help with solving this issue. Can someone help me?

Thanks in advance
Transaction too large  


This is referring to the transaction size in bytes, not Bitcoin.

You need to send the Bitcoin in smaller chunks to yourself, or sweep the dust, as they say. This is because a transaction is made up of unspent outputs (UTXO) and since you are sending a large amount, you will likely have many small UTXO from all of the tips you're trying to spend. This increases the size of the transaction in bytes.

Bitcoin core will return that error if the transaction weight is greater than MAX_STANDARD_TX_WEIGHT, which as of v0.16.3 is 400,000, which also happens to be the maximum size of 1 block.

What is tx weight?


  Transaction weight is defined as Base transaction size * 3 + Total
  transaction size (ie. the same method as calculating Block weight from
  Base size and Total size).
  
  Virtual transaction size is defined as Transaction weight / 4 (rounded
  up to the next integer).
  
  Base transaction size is the size of the transaction serialised with
  the witness data stripped.
  
  Total transaction size is the transaction size in bytes serialized as
  described in BIP144, including base data and witness data.  See BIP
  141