app disconnected from server certainly for a out of memory case

Hello,

I'm new to shiny and today i tried to publish my app.

my app is a dashboard using the packages shiny, shinydashboard,sf,readxl, RcppRoll and tidyverse.
i import a table of 22 000 Ko and all the files liked to my shapefiles with make about 8 800 Ko.

after many changes i manage to publish it without error message, but it disconnected form the server within a few seconds.

after some research i found out that i should check the log. here they are :

2022-09-21T15:26:35.450373+00:00 shinyapps[7064107]: :heavy_check_mark: readr 2.1.2 :heavy_check_mark: forcats 0.5.2
2022-09-21T15:26:35.450416+00:00 shinyapps[7064107]: ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
2022-09-21T15:26:35.450523+00:00 shinyapps[7064107]: Linking to GEOS 3.8.0, GDAL 3.0.4, PROJ 6.3.1; sf_use_s2() is TRUE
2022-09-21T15:26:35.450447+00:00 shinyapps[7064107]: :heavy_multiplication_x: dplyr::filter() masks stats::filter()
2022-09-21T15:26:35.450476+00:00 shinyapps[7064107]: :heavy_multiplication_x: dplyr::lag() masks stats::lag()
2022-09-21T15:26:35.450571+00:00 shinyapps[7064107]:
2022-09-21T15:26:43.448782+00:00 shinyapps[7064107]: Container event from container-7201113: start
2022-09-21T15:26:44.445623+00:00 shinyapps[7064107]: Running on host: 9f280343f066
2022-09-21T15:26:44.445681+00:00 shinyapps[7064107]: Server version: 2022.09.0
2022-09-21T15:26:44.445771+00:00 shinyapps[7064107]: Working directory: /srv/connect/apps/000000
2022-09-21T15:26:44.445731+00:00 shinyapps[7064107]: LANG: C.UTF-8
2022-09-21T15:26:44.445845+00:00 shinyapps[7064107]: R version: 4.2.1
2022-09-21T15:26:44.445915+00:00 shinyapps[7064107]: httpuv version: 1.6.6
2022-09-21T15:26:44.445875+00:00 shinyapps[7064107]: shiny version: 1.7.2
2022-09-21T15:26:44.445993+00:00 shinyapps[7064107]: knitr version: 1.40
2022-09-21T15:26:44.446029+00:00 shinyapps[7064107]: jsonlite version: 1.8.0
2022-09-21T15:26:44.445811+00:00 shinyapps[7064107]: Running content using the current R environment
2022-09-21T15:26:44.445957+00:00 shinyapps[7064107]: rmarkdown version: 2.16
2022-09-21T15:26:44.446105+00:00 shinyapps[7064107]: htmltools version: 0.5.3
2022-09-21T15:26:44.446064+00:00 shinyapps[7064107]: RJSONIO version: (none)
2022-09-21T15:26:44.446140+00:00 shinyapps[7064107]: reticulate version: (none)
2022-09-21T15:26:44.446233+00:00 shinyapps[7064107]:
2022-09-21T15:26:44.446174+00:00 shinyapps[7064107]: Using pandoc: /opt/connect/ext/pandoc/2.16
2022-09-21T15:26:44.446341+00:00 shinyapps[7064107]:
2022-09-21T15:26:44.446400+00:00 shinyapps[7064107]:
2022-09-21T15:26:44.446429+00:00 shinyapps[7064107]: The following object is masked from ‘package:graphics’:
2022-09-21T15:26:44.446306+00:00 shinyapps[7064107]: Shiny application starting ...
2022-09-21T15:26:44.446270+00:00 shinyapps[7064107]: Starting R with process ID: '27'
2022-09-21T15:26:44.446371+00:00 shinyapps[7064107]: Attaching package: ‘shinydashboard’
2022-09-21T15:26:44.446501+00:00 shinyapps[7064107]: box
2022-09-21T15:26:44.446464+00:00 shinyapps[7064107]:
2022-09-21T15:26:44.446544+00:00 shinyapps[7064107]:
2022-09-21T15:26:45.522912+00:00 shinyapps[7064107]: :heavy_check_mark: ggplot2 3.3.6 :heavy_check_mark: purrr 0.3.4
2022-09-21T15:26:45.522870+00:00 shinyapps[7064107]: ── Attaching packages ─────────────────────────────────────── tidyverse 1.3.2 ──
2022-09-21T15:26:45.522984+00:00 shinyapps[7064107]: :heavy_check_mark: tidyr 1.2.1 :heavy_check_mark: stringr 1.4.1
2022-09-21T15:26:45.522944+00:00 shinyapps[7064107]: :heavy_check_mark: tibble 3.1.8 :heavy_check_mark: dplyr 1.0.10
2022-09-21T15:26:45.523026+00:00 shinyapps[7064107]: :heavy_check_mark: readr 2.1.2 :heavy_check_mark: forcats 0.5.2
2022-09-21T15:26:45.523151+00:00 shinyapps[7064107]: :heavy_multiplication_x: dplyr::lag() masks stats::lag()
2022-09-21T15:26:45.523071+00:00 shinyapps[7064107]: ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
2022-09-21T15:26:45.523111+00:00 shinyapps[7064107]: :heavy_multiplication_x: dplyr::filter() masks stats::filter()
2022-09-21T15:26:46.450215+00:00 shinyapps[7064107]: Container event from container-7201112: stop
2022-09-21T15:26:46.620698+00:00 shinyapps[7064107]: Linking to GEOS 3.8.0, GDAL 3.0.4, PROJ 6.3.1; sf_use_s2() is TRUE
2022-09-21T15:26:46.620752+00:00 shinyapps[7064107]:
2022-09-21T15:26:46.620807+00:00 shinyapps[7064107]: Listening on http://127.0.0.1:38191
2022-09-21T15:26:59.445605+00:00 shinyapps[7064107]: Reading layer ATE_FR' from data source /srv/connect/apps/000000/ATE_FR.shp' using driver `ESRI Shapefile'
2022-09-21T15:27:00.445638+00:00 shinyapps[7064107]: Simple feature collection with 51 features and 3 fields
2022-09-21T15:27:00.445707+00:00 shinyapps[7064107]: Geometry type: MULTIPOLYGON
2022-09-21T15:27:00.445799+00:00 shinyapps[7064107]: Bounding box: xmin: -5.141277 ymin: 41.33356 xmax: 9.560094 ymax: 51.08899
2022-09-21T15:27:00.445757+00:00 shinyapps[7064107]: Dimension: XY
2022-09-21T15:27:00.445841+00:00 shinyapps[7064107]: Geodetic CRS: WGS 84
2022-09-21T15:27:02.445656+00:00 shinyapps[7064107]: Container event from container-7201113: oom (out of memory)

I think the main problem is the "out of memory" condition but i dont know how to fix it.

if you need more information just ask me

Free shinyapps.io accounts are limited to 1GB of RAM, if you have a paid account, you can increase this limit.

Depending on your specific application, you could try to remove any preprocessing steps from your app to decrease its RAM requirements.

Thank you for your help, i will try theses differents option