Please help "An error was encountered while running MEGAHIT, (return code 247)"

Hi @CharlesTang,

Are you running QIIME 2 on a Windows laptop? That is, via the Windows Subsystem for Linux (WSL)? If so, this is why. WSL defaults to allocating 50% of the system memory. See here.

So, you'll need to check the links in that post to adjust.