Argument list too long

A glob expanded to more filenames than the shell can pass in one command

why

The shell expands *.fastq.gz into every matching filename before the program starts, and there is a hard OS limit on the total size of that argument list. It fails at a certain number of files, which is why the same command worked on a smaller dataset.

what to do

Feed the files instead of listing them: find . -name '*.fastq.gz' | xargs -n 100 …, or pass a file-of-filenames if the tool supports one. Many bioinformatics tools accept a list file precisely because of this limit.

POSIX ARG_MAX limit
This is one entry from BioErrors, a catalogue of bioinformatics error messages that point at the wrong thing. Every entry was traced to its real cause before it was written down.
If your error is not in it, paste it there and it gets traced and added.