# Broken pipe with 48 threads and 98 Gb of RAM

**URL:** <https://forum.biobakery.org/t/broken-pipe-with-48-threads-and-98-gb-of-ram/7697>\
**Category:** HUMAnN\
**Created:** [December 24, 2024, 11:17am UTC](https://forum.biobakery.org/t/broken-pipe-with-48-threads-and-98-gb-of-ram/7697 "2024-12-24T11:17:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![AbraamSa](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/abraamsa/32/3119_2.png) [@AbraamSa](https://forum.biobakery.org/u/AbraamSa)\
**Post date:** [December 24, 2024, 11:17am UTC](https://forum.biobakery.org/t/broken-pipe-with-48-threads-and-98-gb-of-ram/7697/1 "2024-12-24T11:17:24Z")

</div>

I executed the following code and end up with the following error, i am running this using a machine with 48 threads and 98 Gb of RAM, i used conda to install humann and also tried source code and end up with same error ?!!

> > > humann --input Ex1.fastq --output Ex1 --threads 48

Output files will be written to: /home/ubuntu/nanopore/WGS/Ex1  
Removing spaces from identifiers in input file …

Running metaphlan …

CRITICAL ERROR: Error executing: /home/ubuntu/miniconda3/bin/metaphlan /home/ubuntu/nanopore/WGS/Ex1/Ex1\_humann\_temp/tmpqqtrpzcu/tmp2bwbmnrt -t rel\_ab -o /home/ubuntu/nanopore/WGS/Ex1/Ex1\_humann\_temp/Ex1\_metaphlan\_bugs\_list.tsv --input\_type fastq --bowtie2out /home/ubuntu/nanopore/WGS/Ex1/Ex1\_humann\_temp/Ex1\_metaphlan\_bowtie2.txt --nproc 48

Error message returned from metaphlan :  
Killed  
(ERR): bowtie2-align exited with value 137  
Traceback (most recent call last):  
File “/home/ubuntu/miniconda3/bin/read\_fastx.py”, line 10, in   
sys.exit(main())  
^^^^^^  
File “/home/ubuntu/miniconda3/lib/python3.12/site-packages/metaphlan/utils/read\_fastx.py”, line 168, in main  
f\_nreads, f\_avg\_read\_length = read\_and\_write\_raw(f, opened=False, min\_len=min\_len, prefix\_id=prefix\_id)  
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  
File “/home/ubuntu/miniconda3/lib/python3.12/site-packages/metaphlan/utils/read\_fastx.py”, line 130, in read\_and\_write\_raw  
nreads, avg\_read\_length = read\_and\_write\_raw\_int(inf, min\_len=min\_len, prefix\_id=prefix\_id)  
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  
File “/home/ubuntu/miniconda3/lib/python3.12/site-packages/metaphlan/utils/read\_fastx.py”, line 108, in read\_and\_write\_raw\_int  
\_ = sys.stdout.write(  
^^^^^^^^^^^^^^^^^  
BrokenPipeError: [Errno 32] Broken pipe

---

<div class="post-metadata">

**Author:** ![franzosa](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/franzosa/32/3511_2.png) [@franzosa](https://forum.biobakery.org/u/franzosa)\
**Post date:** [January 2, 2025, 5:23pm UTC](https://forum.biobakery.org/t/broken-pipe-with-48-threads-and-98-gb-of-ram/7697/2 "2025-01-02T17:23:20Z")

</div>

Do you still see this error if running with fewer threads (or a single thread)? 48 is a lot for some processes and you might be encountering this error because of it. I typically use 8 threads when running MetaPhlAn + HUMAnN. In my experience there are diminishing returns for accelerated read mapping (the bottleneck in these methods) beyond that many threads.

---

<div class="post-metadata">

**Author:** ![AbraamSa](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/abraamsa/32/3119_2.png) [@AbraamSa](https://forum.biobakery.org/u/AbraamSa)\
**Post date:** [January 5, 2025, 11:32am UTC](https://forum.biobakery.org/t/broken-pipe-with-48-threads-and-98-gb-of-ram/7697/3 "2025-01-05T11:32:17Z")

</div>

I still get same error, even if i use fewer number of threads
