# Stucked at step 2 of 2 when starting session

**URL:** <https://renku.discourse.group/t/stucked-at-step-2-of-2-when-starting-session/808>\
**Category:** General\
**Created:** [14 May 2023 10:00 UTC](https://renku.discourse.group/t/stucked-at-step-2-of-2-when-starting-session/808 "2023-05-14T10:00:37Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![aupraz](https://avatars.discourse-cdn.com/v4/letter/a/8edcca/32.png) [@aupraz](https://renku.discourse.group/u/aupraz)\
**Post date:** [14 May 2023 10:00 UTC](https://renku.discourse.group/t/stucked-at-step-2-of-2-when-starting-session/808/1 "2023-05-14T10:00:37Z")

</div>

When I try to start a new session, it is stuck at the step 2 of 2 “Starting Session”, cloning and configuring the repository. It is loading for more than half an hour and then the session fails to open…

 ![image](https://global.discourse-cdn.com/free1/uploads/renku/original/1X/d44a0360cae4c6f2712d1e4b3cf78c054530e922.png)

It is a shared project and the same is happening with my teammates when they want to start the session. Here is the link of our project

> **[Reproducible Data Science | Open Research | Renku](https://renkulab.io/projects/fabian.fopp/cloud-forests)**
>
> Work together on data science projects reproducibly. Share code, data and computational environments whilst accessing free computing resources.

It is probably an issue linked to storage but it’s really weird because we don’t have a lot of data (32.2 GB)

Can anybody help me with this please

---

<div class="post-metadata">

**Author:** ![cramakri](https://yyz2.discourse-cdn.com/free1/user_avatar/renku.discourse.group/cramakri/32/7_2.png) [@cramakri](https://renku.discourse.group/u/cramakri)\
**Post date:** [15 May 2023 08:52 UTC](https://renku.discourse.group/t/stucked-at-step-2-of-2-when-starting-session/808/2 "2023-05-15T08:52:56Z")

</div>

I can try to look into this. Your project is private — could you give me access to it? My username is cramakri@ethz.ch

---

<div class="post-metadata">

**Author:** ![aupraz](https://avatars.discourse-cdn.com/v4/letter/a/8edcca/32.png) [@aupraz](https://renku.discourse.group/u/aupraz)\
**Post date:** [16 May 2023 09:04 UTC](https://renku.discourse.group/t/stucked-at-step-2-of-2-when-starting-session/808/3 "2023-05-16T09:04:05Z")

</div>

> [@cramakri](#):
>
> cramakri@ethz.ch

We gave you access to the project, thanks a lot for helping us !

---

<div class="post-metadata">

**Author:** ![cramakri](https://yyz2.discourse-cdn.com/free1/user_avatar/renku.discourse.group/cramakri/32/7_2.png) [@cramakri](https://renku.discourse.group/u/cramakri)\
**Post date:** [16 May 2023 09:42 UTC](https://renku.discourse.group/t/stucked-at-step-2-of-2-when-starting-session/808/4 "2023-05-16T09:42:56Z")

</div>

Thanks for that access. I was able to take a look and also gathered some information from others on the team. It looks like the problem has to do with the amount of data in the project.

Your project is configured to automatically fetch all LFS data as part of start up. It is true that the largest storage option available on the public RenkuLab instance is 64 GB, but LFS requires more space than just reported storage amount, and I am told that 64 GB is not sufficient to check out a repository with 32 GB of LFS objects.

The easiest way around this would be to not fetch the LFS content on start up and selectively retrieve the content needed using the `renku storage` commands.

If you do need access to all the content that is currently in LFS, then you should move that content into S3 storage, since that will not count against the session disk quota.

Let me know if you need any additional clarification or help with this.

---

<div class="post-metadata">

**Author:** ![aupraz](https://avatars.discourse-cdn.com/v4/letter/a/8edcca/32.png) [@aupraz](https://renku.discourse.group/u/aupraz)\
**Post date:** [17 May 2023 07:54 UTC](https://renku.discourse.group/t/stucked-at-step-2-of-2-when-starting-session/808/5 "2023-05-17T07:54:23Z")

</div>

Thanks a lot for your help! It seems you fixes our problem. We would be very happy to come back to you if we have further questions.

---

<div class="post-metadata">

**Author:** ![aupraz](https://avatars.discourse-cdn.com/v4/letter/a/8edcca/32.png) [@aupraz](https://renku.discourse.group/u/aupraz)\
**Post date:** [17 May 2023 21:55 UTC](https://renku.discourse.group/t/stucked-at-step-2-of-2-when-starting-session/808/6 "2023-05-17T21:55:41Z")

</div>

Hi again ! We have another question…  
We have a Raster Layer with 371 layers:

```auto
class : SpatRaster 
dimensions : 35, 17, 372 (nrow, ncol, nlyr)
resolution : 2.5, 1.267606 (x, y)
extent : -1.25, 41.25, 27.25352, 71.61972 (xmin, xmax, ymin, ymax)
coord. ref. :  
source(s) : memory
names : clt_301, clt_302, clt_303, clt_304, clt_305, clt_306, ... 
min values : 18.14771, 11.93175, 5.477096, 14.04819, 4.086611, 0.00000, ... 
max values : 99.79733, 99.92499, 99.412560, 98.52460, 95.505341, 91.06673, ... 
time (days) : 2040-01-16 to 2070-12-16 

```

Each represents a month. So the whole raster file contains data for a total of 31 years. The layers are not named by months but in ascending chronology from hurs\_301 to hurs\_672. Now we need to calculate the average per month over all years (January, February, March, April, May, June, July, August, September, October, November, December). The final goal is to generate a raster file that contains 12 layers, per layer the average of one month ( 1: layer average January over all 31 years, 2nd layer average February over all years etc.). We have thought of the following steps: I create a loop that names the layers from 1-12 and then calculate the average of the layers per month and stack them to a raster.

```auto
ipsl_hurs_126_future <- raster(ipsl_hurs_126_future) #read in ispl_hurs_126_future as a raster

# Create a vector of month names
month_names <- c("January", "February", "March", "April", "May", "June",
                 "July", "August", "September", "October", "November", "December")

# Create an empty RasterBrick to store the monthly means
monthly_means <- raster(nrow=nrow(ipsl_hurs_126_future), ncol=ncol(ipsl_hurs_126_future))

# Loop through each month
for (month_idx in 1:12) {
  # Initialize an empty RasterLayer to store the averaged result
  avg_layer <- NULL
  
  # Get the month's layer indices
  month_layers <- seq(month_idx, 371, 12)
  
  # Loop through the month's layers and calculate the average
  for (layer_idx in month_layers) {
    current_layer <- ipsl_hurs_126_future[[layer_idx]]

 if (is.null(avg_layer)) {
      avg_layer <- current_layer
    } else {
      avg_layer <- avg_layer + current_layer
    }
  }
  
  # Divide the accumulated sum by the number of layers to get the average
  avg_layer <- avg_layer / length(month_layers)
  
  # Set a meaningful name for the averaged layer
  averaged_layer_name <- paste("avg_hurs_", month_names[month_idx], sep = "")
  
  # Assign the averaged layer to the RasterBrick
  monthly_means[[month_idx]] <- avg_layer
}

# Print the resulting monthly means SpatRaster
print(monthly_means)

class(monthly_means)

```

Unfortunately i end up with this:

```auto
class : RasterLayer 
dimensions : 35, 17, 595 (nrow, ncol, ncell)
resolution : 21.17647, 5.142857 (x, y)
extent : -180, 180, -90, 90 (xmin, xmax, ymin, ymax)
crs : +proj=longlat +datum=WGS84 +no_defs 

```

Which is not what we want. Do you know how to solve this problem or how to do it correctly? Thanks a lot in advance! Also we give you access to the new project **blina/templatecloud-forrest** (it is the same but we had to redo one bc Renku was bugging too much). The name of the file is delta\_change\_method.R
