You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have to create a prototype map based dashboard for a project. I decided on R shiny, as it had the best data management for my data, and easy to use. I use Leaflet in combination with Rshiny. After creating the map, it gets updated at certain intervals and recreates the map with new data (kind off batch real time). The data will be quite a lot, but is still manageable on a leaflet application.
I was checking my taks manager while running the app. My problem is that when this app is run, RStudio uses some memory (approximately 350MB on my pc), and every time it updates, the memory usage of Rshiny increases by 20MB.
> object.size(map)
148000 byte
This means after a few minutes, Rstudio runs out of memory. I have given it more memory... but that just means it runs out later.
Own Research
I have looked at similar questions: https://stackoverflow.com/questions/30818373/shiny-r-reactivevalues-memory-leak -- Unanswered #1551 -- Used the Observe() function #1591 -- I used the options(shiny.reactlog=TRUE) and check the output. I have only one map object #1151 -- Used Plotly instead of leaflet and was not solved, even though it was closed.
There was some more along the same topics and same unanswered questions.
Specifications
Windows 10
24GB RAM
64-bit operating system
Intel(R) Core i7-6700HQ CPU @ 2.6GHz
R version 3.4.3 (2017-11-30)
leaflet 1.1.0
shinydashboard 0.6.1
I hope someone can help. Thank you :)
The text was updated successfully, but these errors were encountered:
I wasn't able to replicate this issue. I profiled your app with profvis and was able to see memory being reclaimed with garbage collection.
Are you still able to replicate this problem? How long does it take for RStudio to crash? Also could you try upgrading to the latest version of Shiny and R?
I just copied this code into my R studio as a new script ran it and it still happens. The memory drops by 10MB and then rises by 20 again. So it seems to collect some garbage but it is not enough.
However, I did solve the problem of updating the map by using leaflet proxy instead. This work well even for large data sets.
Background
I have to create a prototype map based dashboard for a project. I decided on R shiny, as it had the best data management for my data, and easy to use. I use Leaflet in combination with Rshiny. After creating the map, it gets updated at certain intervals and recreates the map with new data (kind off batch real time). The data will be quite a lot, but is still manageable on a leaflet application.
Code:
Issue
I was checking my taks manager while running the app. My problem is that when this app is run, RStudio uses some memory (approximately 350MB on my pc), and every time it updates, the memory usage of Rshiny increases by 20MB.
This means after a few minutes, Rstudio runs out of memory. I have given it more memory... but that just means it runs out later.
Own Research
I have looked at similar questions:
https://stackoverflow.com/questions/30818373/shiny-r-reactivevalues-memory-leak -- Unanswered
#1551 -- Used the Observe() function
#1591 -- I used the options(shiny.reactlog=TRUE) and check the output. I have only one map object
#1151 -- Used Plotly instead of leaflet and was not solved, even though it was closed.
There was some more along the same topics and same unanswered questions.
Specifications
Windows 10
24GB RAM
64-bit operating system
Intel(R) Core i7-6700HQ CPU @ 2.6GHz
R version 3.4.3 (2017-11-30)
leaflet 1.1.0
shinydashboard 0.6.1
I hope someone can help. Thank you :)
The text was updated successfully, but these errors were encountered: