App logs show out of memory message, metrics show less than 300MB memory usage, but instance size set at 1GB?

Hello, my problem is as it says in the title, I'm wondering if anyone knows what is going on?

I have used profvis to track memory usage of this app, and it also did not show so much memory usage (at least in difference between memory allocation and deallocation).

Thanks in advance for any help!

Shinyapps.io memory usage metrics:

Instance size:

Profvis results:


(The first negative memory value is -16916.8)

Shinyapps.io logs:

2022-03-13T17:05:29.824733+00:00 shinyapps[5825051]: 
2022-03-13T17:05:29.824735+00:00 shinyapps[5825051]: Listening on http://127.0.0.1:45359
2022-03-13T17:05:35.839271+00:00 shinyapps[5825051]: Server version: 2022.02.0
2022-03-13T17:05:35.839299+00:00 shinyapps[5825051]: LANG: C.UTF-8
2022-03-13T17:05:35.834728+00:00 shinyapps[5825051]: Running on host: 72c8d467e770
2022-03-13T17:05:35.839352+00:00 shinyapps[5825051]: rmarkdown version: (none)
2022-03-13T17:05:35.839323+00:00 shinyapps[5825051]: shiny version: 1.7.1
2022-03-13T17:05:35.839330+00:00 shinyapps[5825051]: httpuv version: 1.6.5
2022-03-13T17:05:35.839364+00:00 shinyapps[5825051]: knitr version: (none)
2022-03-13T17:05:35.839307+00:00 shinyapps[5825051]: R version: 4.1.2
2022-03-13T17:05:35.839596+00:00 shinyapps[5825051]: Using pandoc: /opt/connect/ext/pandoc/2.16
2022-03-13T17:05:35.839365+00:00 shinyapps[5825051]: jsonlite version: 1.8.0
2022-03-13T17:05:35.839375+00:00 shinyapps[5825051]: RJSONIO version: (none)
2022-03-13T17:05:35.839397+00:00 shinyapps[5825051]: htmltools version: 0.5.2
2022-03-13T17:05:35.839425+00:00 shinyapps[5825051]: reticulate version: (none)
2022-03-13T17:05:36.159726+00:00 shinyapps[5825051]: Using jsonlite for JSON processing
2022-03-13T17:05:36.163635+00:00 shinyapps[5825051]: Shiny application starting ...
2022-03-13T17:05:36.163209+00:00 shinyapps[5825051]: 
2022-03-13T17:05:36.163210+00:00 shinyapps[5825051]: Starting R with process ID: '43'
2022-03-13T17:05:36.249769+00:00 shinyapps[5825051]: 
2022-03-13T17:05:36.250366+00:00 shinyapps[5825051]: 
2022-03-13T17:05:36.249771+00:00 shinyapps[5825051]: Attaching package: ‘DT’
2022-03-13T17:05:36.348938+00:00 shinyapps[5825051]: 
2022-03-13T17:05:36.250365+00:00 shinyapps[5825051]: The following objects are masked from ‘package:shiny’:
2022-03-13T17:05:36.348939+00:00 shinyapps[5825051]: 
2022-03-13T17:05:36.249771+00:00 shinyapps[5825051]: 
2022-03-13T17:05:36.348938+00:00 shinyapps[5825051]:     page
2022-03-13T17:05:36.348937+00:00 shinyapps[5825051]: The following object is masked from ‘package:utils’:
2022-03-13T17:05:36.348668+00:00 shinyapps[5825051]: Attaching package: ‘bslib’
2022-03-13T17:05:36.348669+00:00 shinyapps[5825051]: 
2022-03-13T17:05:36.348667+00:00 shinyapps[5825051]: 
2022-03-13T17:05:36.250366+00:00 shinyapps[5825051]:     dataTableOutput, renderDataTable
2022-03-13T17:05:36.250366+00:00 shinyapps[5825051]: 
2022-03-13T17:05:36.731366+00:00 shinyapps[5825051]: 
2022-03-13T17:05:36.731368+00:00 shinyapps[5825051]: Attaching package: ‘dplyr’
2022-03-13T17:05:36.731369+00:00 shinyapps[5825051]: 
2022-03-13T17:05:36.731613+00:00 shinyapps[5825051]: The following object is masked from ‘package:simmer’:
2022-03-13T17:05:36.731614+00:00 shinyapps[5825051]: 
2022-03-13T17:05:36.731615+00:00 shinyapps[5825051]: 
2022-03-13T17:05:36.731615+00:00 shinyapps[5825051]:     select
2022-03-13T17:05:36.731831+00:00 shinyapps[5825051]: The following objects are masked from ‘package:stats’:
2022-03-13T17:05:36.731833+00:00 shinyapps[5825051]: 
2022-03-13T17:05:36.731832+00:00 shinyapps[5825051]: 
2022-03-13T17:05:36.731833+00:00 shinyapps[5825051]:     filter, lag
2022-03-13T17:05:36.732035+00:00 shinyapps[5825051]: 
2022-03-13T17:05:36.732034+00:00 shinyapps[5825051]: The following objects are masked from ‘package:base’:
2022-03-13T17:05:36.732035+00:00 shinyapps[5825051]:     intersect, setdiff, setequal, union
2022-03-13T17:05:36.732036+00:00 shinyapps[5825051]: 
2022-03-13T17:05:37.031099+00:00 shinyapps[5825051]: 
2022-03-13T17:05:37.031101+00:00 shinyapps[5825051]: Listening on http://127.0.0.1:45623
2022-03-13T17:09:05.236081+00:00 shinyapps[system]: Out of memory!

I think you need to look at the detail of the profvis info that is aggregated into the first entry. a de-allocation of 1600mb (and a 1700mb allocation shown on the right of that) , implies you will have likely blown through a 1Gb instance.