-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Shiny is not releasing memory #3953
Comments
I'm observing similar behaviour with one of my "bigger" apps and tried to create a reproducible example to show it. However, it turns out using my example the memory is released after closing a session (even without calling
Here a related SO post can be found. |
Hi, do you still experience these problems? We've also experienced them. Have you found any tips for dealing with memory issues in long running apps? |
Hello,
We have detected that shiny app is not releasing memory when the user session ends, which we believe is a similar problem to this bug rstudio/plumber#938 that we have posted.
We understand that in this case the problem is that R memory usage is growing because some objects are not released in a specific case.
We have tried to solve the problem by adding a gc() in the session$onSessionEnded, however it has not generated the expected result as we obtained with the postserialize in the plumber apis. We are not experts on how shiny destroys reactive objects, but we believe that this is where the problem lies because we assume that onSessionEnded happens after shiny destroys the objects.
We do not know if there is another way to implement gc() so that the memory is freed when the user session ends
Reading previous bugs we have found this bug #1253 which we understand is similar
This problem has an impact when you always have a process active. This becomes relevant when you have the apps in a productive environment with high demand (hosted in posit connect for example).
Regards,
The text was updated successfully, but these errors were encountered: