Solana candy machine upload assets Error: memory allocation failed, out of memory

I was trying to upload testing content by

ts-node src/candy-machine-cli.ts upload assets --env devnet --keypair "~\.config\solana\devnet.json" -n 10

And ran into error below

Transaction simulation failed: Error processing Instruction 1: Program failed to complete Program 11111111111111111111111111111111 invoke [1] Program 11111111111111111111111111111111 success Program cndyAnrLdpjq1Ssp1z8xxDsB8dxe7u4HL5Nxi2K5WXZ invoke [1] Program log: Error: memory allocation failed, out of memory Program cndyAnrLdpjq1Ssp1z8xxDsB8dxe7u4HL5Nxi2K5WXZ consumed 200000 of 200000 compute units Program failed to complete: BPF program panicked Program cndyAnrLdpjq1Ssp1z8xxDsB8dxe7u4HL5Nxi2K5WXZ failed: Program failed to complete

I think the message may be misleading since I'm processing only 10 images. But not sure what exactly went wrong.


Solution 1:

Not documented but according to Metaplex's code, the name length limit is 32

All the size limits for candy machine metadata can be found here (defined here).

Important values people commonly have errors with are:

MAX_NAME_LENGTH = 32;
MAX_SYMBOL_LENGTH = 10;
MAX_URI_LENGTH = 200;

so definitely start with checking the name length and symbol length in your metadata. The verify_metadata cmd in metaplex cli will also help to check for this before you upload.