# Broken Pipe Error

**URL:** <https://hpc-discourse.usc.edu/t/broken-pipe-error/269>\
**Category:** Discovery Cluster\
**Created:** [November 18, 2020, 10:42pm UTC](https://hpc-discourse.usc.edu/t/broken-pipe-error/269 "2020-11-18T22:42:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rajatkoc](https://hpc-discourse.usc.edu/letter_avatar_proxy/v4/letter/r/b4bc9f/32.png) [@rajatkoc](https://hpc-discourse.usc.edu/u/rajatkoc)\
**Post date:** [November 18, 2020, 10:42pm UTC](https://hpc-discourse.usc.edu/t/broken-pipe-error/269/1 "2020-11-18T22:42:22Z")

</div>

I am trying to run an R code on the remote server. I get the following error after around 3 hours every time I try to run the R script:

“packet\_write\_wait: Connection to 68.181.11.7 port 22: Broken pipe”

Any idea on how I can solve this. I had reserved 10 hours on the server using the `salloc’ command.

I am using a Macbook Pro with macOS Mojave Version10.14.6.

---

<div class="post-metadata">

**Author:** ![csul](https://hpc-discourse.usc.edu/letter_avatar_proxy/v4/letter/c/3be4f8/32.png) [@csul](https://hpc-discourse.usc.edu/u/csul)\
**Post date:** [November 19, 2020, 9:19pm UTC](https://hpc-discourse.usc.edu/t/broken-pipe-error/269/2 "2020-11-19T21:19:44Z")

</div>

Hi,  
This kind of issue has been coming up more frequently as people are using their home networks more. You can add these lines to your `~/.ssh/config` file (create if necessary)

```auto
Host *
   ServerAliveInterval 60

```

This will send a signal every 60 seconds to prevent your connection from being terminated.

---

<div class="post-metadata">

**Author:** ![dstrong](https://hpc-discourse.usc.edu/letter_avatar_proxy/v4/letter/d/4491bb/32.png) [@dstrong](https://hpc-discourse.usc.edu/u/dstrong)\
**Post date:** [June 7, 2024, 12:01am UTC](https://hpc-discourse.usc.edu/t/broken-pipe-error/269/3 "2024-06-07T00:01:27Z")

</div>

Closed on June 7, 2024, 12:01am UTC


