<p>It seems RStudio server doesn't know it's limitations. Currently, Projects are limited to 1GB of RAM. Using <a href="https://github.com/krlmlr/ulimit" rel="nofollow noreferrer">the R package</a> <code>ulimit</code> which mirrors the function of <code>ulimit</code> and allows implementation of memory limits in linux I was able to set my own limitations within the R session. After setting the limit to 1GB I see the <code>ulimit</code> limitation being tripped when invoking <code>ScaleData()</code>. Looks like a case of exceeding available system resources.</p>

CC BY-SA 4.0
2018-11-14T18:56:58.607Z
2018-11-14T18:56:58.607Z
Kohl Kinning
<p>Using the sample data in the 2,700 PBMC clustering tutorial, the session crashes at the <code>ScaleData()</code> step. The progress bar remains at 0% and hangs, followed by an R crash. I've tried reducing the size for number of genes to scale at in a single computation with the argument <code>block.size</code> with no change. The Seurat S4 object is only ~70mb so I can't imagine I'm exceeding the RStudio Cloud 1gb RAM limitations.</p>

<p>If you'd like to check out the cloud instance I can add you to the workspace temporarily. There is a limit on members allowed in a workspace.</p>

<p>I've been trying to run this tutorial on another remote cluster in RStudio inside of a container (Singularity here vs. Docker in RStudio Cloud) and am hitting the same snag.</p>

<p>I get receive no errors from RStudio Cloud, but in the other evirnment I get this error:</p>

<p><code>ERROR session hadabend; LOGGED FROM: rstudio::core::Error {anonymous}::rInit(const rstudio::r::session::RInitInfo&amp;) /home/ubuntu/rstudio/src/cpp/session/SessionMain.cpp:563</code>.</p>

<p>On <a href="https://github.com/Homebrew/homebrew-science/issues/5504" rel="nofollow noreferrer">this issue thread</a> someone mentions it they receive this error message when hitting their RAM limits.</p>

<p>The source for <code>ScaleData()</code> can be found in the <a href="https://github.com/satijalab/seurat/blob/65b77a9480281ef9ab1aa8816f7c781752092c18/R/preprocessing.R" rel="nofollow noreferrer">Github repo</a>.</p>

CC BY-SA 4.0
2018-11-12T14:49:21.953Z
Are you following the tutorial exactly? I don't see `ScaleData` [in the tutorial](https://satijalab.org/seurat/pbmc3k_tutorial_1_4.html).
Devon Ryan
CC BY-SA 4.0
2018-11-12T16:05:10.897Z
`RegressOut()` is a deprecated function, regression now happens in the data scaling step. `vars.to.regress` is now passed as an argument to `ScaleData()`. Somehow you've got an old version of the tutorial, see [this tutorial](https://satijalab.org/seurat/pbmc3k_tutorial.html) compiled 22 March, 2018.
Kohl Kinning
<r><seurat><rstudio>
ScaleData() from Seurat causes crash on RStudio Cloud
# ScaleData() from Seurat causes crash on RStudio Cloud

(Asked by: username_0 on 2018-11-11)

Using the sample data in the 2,700 PBMC clustering tutorial, the session crashes at the `ScaleData()` step. The progress bar remains at 0% and hangs, followed by an R crash. I've tried reducing the size for number of genes to scale at in a single computation with the argument `block.size` with no change. The Seurat S4 object is only ~70mb so I can't imagine I'm exceeding the RStudio Cloud 1gb RAM limitations.

If you'd like to check out the cloud instance I can add you to the workspace temporarily. There is a limit on members allowed in a workspace.

I've been trying to run this tutorial on another remote cluster in RStudio inside of a container (Singularity here vs. Docker in RStudio Cloud) and am hitting the same snag.

I get receive no errors from RStudio Cloud, but in the other evirnment I get this error:

`ERROR session hadabend; LOGGED FROM: rstudio::core::Error {anonymous}::rInit(const rstudio::r::session::RInitInfo&) /home/ubuntu/rstudio/src/cpp/session/SessionMain.cpp:563`.

On [this issue thread](https://github.com/Homebrew/homebrew-science/issues/5504) someone mentions it they receive this error message when hitting their RAM limits.

The source for `ScaleData()` can be found in the [Github repo](https://github.com/satijalab/seurat/blob/65b77a9480281ef9ab1aa8816f7c781752092c18/R/preprocessing.R).

**Tags:** r, seurat, rstudio
> **Comments:**
> **username_1**: Are you following the tutorial exactly? I don't see `ScaleData` [in the tutorial](https://satijalab.org/seurat/pbmc3k_tutorial_1_4.html).  
> **username_0**: `RegressOut()` is a deprecated function, regression now happens in the data scaling step. `vars.to.regress` is now passed as an argument to `ScaleData()`. Somehow you've got an old version of the tutorial, see [this tutorial](https://satijalab.org/seurat/pbmc3k_tutorial.html) compiled 22 March, 2018.  

---

## 1 answers

### Answer by username_0 on 2018-11-14. Score: 2 | Accepted answer

It seems RStudio server doesn't know it's limitations. Currently, Projects are limited to 1GB of RAM. Using [the R package](https://github.com/krlmlr/ulimit) `ulimit` which mirrors the function of `ulimit` and allows implementation of memory limits in linux I was able to set my own limitations within the R session. After setting the limit to 1GB I see the `ulimit` limitation being tripped when invoking `ScaleData()`. Looks like a case of exceeding available system resources.


---

