简体   繁体   English

多个R Shiny进程

[英]Multiple R Shiny processes

I have this several Shiny sleeping processes consuming some resources. 我有几个Shiny睡眠过程消耗了一些资源。 Do you know how they are created and why they remain? 您知道它们是如何创建的以及为什么保留吗?

htop command htop命令

I think it slows down the response time. 我认为这会减慢响应时间。

I found these topics but I couldn'l really get a final solution. 我找到了这些主题,但我无法真正找到最终解决方案。 References: link1 link2 参考: link1 link2

I think I solved this question. 我想我解决了这个问题。

The sleeping processes are/were caused by reactiveTimer function. 睡眠过程是由reactTimer函数引起的。 So in order to solve it you just need to add a second argument like this: 因此,为了解决该问题,您只需要添加第二个参数,如下所示:

reactiveTimer(300000, session = getDefaultReactiveDomain()) reactTimer(300000,会话= getDefaultReactiveDomain())

When you close your app session it will also stop/kill the sleeping processes. 当您关闭应用程序会话时,它还将停止/终止睡眠过程。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM