简体   繁体   English

在shinyapps.io上睡觉shinyapp

[英]Sleeping shinyapp on shinyapps.io

How do I 'awaken' a sleeping shinyapp on shinyapps.io? 我怎么在shinyapps.io'唤醒'睡觉的shinyapp?

I have tried terminating and then (re)deploying. 我试过终止然后(重新)部署。 This does not work. 这不起作用。

我认为睡觉的shinyapp会在有人使用时自动唤醒。

Active hours are the number of hours that your application is up and serving requests. 活动时间是应用程序启动和提供请求的小时数。 If you have one or one hundred people using your Shiny app for an hour, you are still only using one active hour. 如果您有一个或一百个人使用您的Shiny应用程序一小时,您仍然只使用一个活跃小时。 When an application hasn't received any traffic for some time (the idle period) it will put itself to sleep which stops the active hour counter from accruing. 当应用程序在一段时间内(空闲时段)没有收到任何流量时,它将自己进入休眠状态,从而停止活动小时计数器的累积。 When a user requests an application, shinyapps.io will “wake up” your application so that it is running and capable of servicing the request. 当用户请求应用程序时,shinyapps.io将“唤醒”您的应用程序,使其正在运行并能够为请求提供服务。

From this , it would be helpful. 这里 ,它会有所帮助。

That is my experience too. 这也是我的经历。 As soon as someone navigates to the application URL the application changes state from 'sleeping' to 'running'. 只要有人导航到应用程序URL,应用程序就会将状态从“正在休眠”更改为“正在运行”。

Similar issue: I was having trouble understanding why directory index pages weren't loading when the applications were asleep. 类似的问题:我无法理解为什么目录索引页面在应用程序处于睡眠状态时没有加载。

Our structure: 我们的结构:

<server>:<port>/
                shiny_s/
                        <user1>/
                                <app1 folder>/app.R
                                <app2 folder>/app.R
                        <user2>/
                                <app1 folder>/app.R

etc. 等等

If the applications are asleep, directing a browser to <server>:<port> shows that shiny server is running fine. 如果应用程序处于睡眠状态,则将浏览器定向到<server>:<port>表明闪亮的服务器运行正常。 But go to any directory index page (without an app.R in it... eg, <server>:<port>/shiny_s or <server>:<port>/shiny_s/<user> ) and the page doesn't load, returning err_empty_response after what feels like a 60 second timeout. 但是转到任何目录索引页面(其中没有app.R ...例如, <server>:<port>/shiny_s<server>:<port>/shiny_s/<user> )并且页面没有加载,返回err_empty_response后感觉像60秒超时。 However, go to the application folder: <server>:<port>/shiny_s/<user>/<application folder> and the application wakes, runs as expected, and the directory folders now load indices as expected. 然而,进入应用程序文件夹: <server>:<port>/shiny_s/<user>/<application folder>和应用醒来,按预期运行, 并且目录文件夹现在负载指数如预期。

Makes me wonder if there is a way to get shiny apps to wake when a user visits the directory index pages? 让我想知道当用户访问目录索引页时是否有办法让闪亮的应用程序唤醒?

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

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