I am trying to run blastx (version 2.2.28) with the following command line:

    blastx -db nr -outfmt 5 -evalue 1e-3 -word_size 3 -show_gis -num_alignments 1 \
    -max_hsps 20 -num_threads 5 -out transcripts_refonly.xml -query transcripts_refonly.fa

So when blastx is running, I can see the output file that grows in size, however when blastx finishes, the output file then is empty (0kb). 
This happens when I run it with big files like transcprit fasta file (from a RNA-seq project) of ~30Mb (21000 sequences), but  if I run just a smaller file (20 sequences) it works good. 

I tried also with .txt ouput format and it happens the same, and also run it into the cluster and different servers and still not working.

Does someone knows what I am doing wrong?

Thank you
I guess that it was something about memory.. still don't know. 
My solution: just split my file into several small files (~100 sequences per file) and run multiple blastx at the same time in the cluster.