Augur alignment failing - problem with mafft

Hi! I am trying to make a build on Nextstrain by starting with the GISAID provided nextmeta and nextfasta files, i.e., with the whole ~300k sequences available. I successfully ran getting_started datasets on my own laptop and in cluster, but I don’t seem to be able to get the workflow for my own build flowing. In both instances, it gets stuck in alignment phase with mafft.

On laptop, the error is

Error in rule align:
jobid: 24
output: results/aligned.fasta
log: logs/align.txt (check log file(s) for error message)
shell:

    mafft             --auto             --thread 2             --keeplength             --addfragments             results/prefiltered.fasta             defaults/reference_seq.fasta > results/aligned.fasta 2> logs/align.txt
    
    (one of the commands exited with non-zero exit code; note that snakemake uses bash strict mode!)

Logfile logs/align.txt:
nadd = 287170
npair = 287170
nseq = 287171
nlen = 59753
use ktuples, size=6!
nadd = 287170
ppenalty_ex = -10
nthread = 2
blosum 62 / kimura 200
sueff_global = 0.100000
norg = 1
njobc = 2
Cannot allocate 239013 character vector.

While in cluster:

[Mon Dec 28 16:40:19 2020]
Error in rule align:
jobid: 28
output: results/aligned.fasta
log: logs/align.txt (check log file(s) for error message)
shell:

    mafft             --auto             --thread 12             --keeplength             --addfragments             results/prefiltered.fasta             defaults/reference_seq.fasta > results/aligned.fasta 2> logs/align.txt
    
    (one of the commands exited with non-zero exit code; note that snakemake uses bash strict mode!)

Logfile logs/align.txt:
grep: write error
cat: write error: No space left on device
bioconda3_env/nextstrain/bin/mafft: line 1211: [: -eq: unary operator expected
bioconda3_env/nextstrain/bin/mafft: line 1229: [: too many arguments
bioconda3_env/nextstrain/bin/mafft: line 1234: [: too many arguments
bioconda3_env/nextstrain/bin/mafft: line 1239: [: too many arguments
bioconda3_env/nextstrain/bin/mafft: line 1244: [: -lt: unary operator expected
bioconda3_env/nextstrain/bin/mafft: line 1249: [: -lt: unary operator expected
bioconda3_env/nextstrain/bin/mafft: line 1256: [: -lt: unary operator expected
bioconda3_env/nextstrain/bin/mafft: line 1263: [: -lt: unary operator expected
expr: syntax error
bioconda3_env/nextstrain/bin/mafft: line 1323: [: -: integer expression expected
bioconda3_env/nextstrain/bin/mafft: line 1331: [: too many arguments
bioconda3_env/nextstrain/bin/mafft: line 1334: [: too many arguments
bioconda3_env/nextstrain/bin/mafft: line 1975: [: -gt: unary operator expected

The --keeplength and --mapout options are supported
only with --add, --addfragments or --addlong.

Removing output files of failed job align since they might be corrupted:
results/aligned.fasta
Shutting down, this might take some time.
Exiting because a job execution failed. Look above for error message
Complete log: /ncov/.snakemake/log/2020-12-28T164016.142116.snakemake.log

The error on my laptop suggets that the larger datasets leads to very long alignment (nlen=59752), which sounds problematic. Would that be the cause of the failure in both instances?

Looking at mafft, it seems that this is a common problem with mafft (MAFFT - a multiple sequence alignment program) - is there a simple way to solve this issue?