2

I have an app that I have made with the package shinydashboard. It has three scripts: ui.R, server.R, and global.R. For a year this app has been hosted on shinyapps.io without a problem. It does however use an API to extract data from a database in Amazon web services. Over time the data grew and grew and eventually my app went over the 1GB of RAM memory that is allowed for the free account. I received the error, "exited normally with code 137, signal 9 (SIGKILL)". I looked at the logs in shinyapps.io and I saw that it said: "out of memory!". I decided to simplify my app and greatly reduce the amount of data imported with the API however I still was getting the same error.

I decided to use the package profvis to profile my app and to see what is running slow and what needs a great deal of memory allocation, but I can't tell exactly how much memory is being allocated to my app.

Here is an image of the flame graphenter image description here

and here is the data sectionenter image description here

Am I to understand that all the merges that I am doing is the thing that is taking up the most time in my app? Also when looking at the data section it says for the profvis row that 1251.1 MB of memory was allocated. Does that mean that's the total amount of memory needed for my app?

Nick
  • 369
  • 1
  • 3
  • 18
  • 1
    Yes, looks like you are merging some big datasets. Plus there are some overhead memory cost to run R and some other background processes. I suspect the real memory usage is more than 1.2G. – lz100 Oct 07 '21 at 22:23

0 Answers0