且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Shiny 正常退出,代码 137,信号 9 (SIGKILL)

更新时间:2022-05-28 01:17:35

我遇到了完全相同的问题,其中一个解决方案确实是购买付费计划并增加实例大小"在设置"中Shiny App 通用仪表板的选项卡(或通过 rsconnect::configureApp() 中的size"参数手动指示).

I had the exact same issue and one of the solutions was indeed to buy a paid plan and increasing the "Instance Size" in the "Settings" tab of the Shiny App general dashboard (or indicating it manually through the "size" argument in rsconnect::configureApp()).

但是,我也通过在 R 中加载我使用的所有 CSV、XLSX 文件,然后使用 saveRDS() 将它们保存为 RDS 文件来解决这个问题.然后,您可以使用 readRDS() 加载它们.这不会减少 R 中的内存,但会大大减少文件的大小(在我的情况下几乎减少了三分之一),使您能够低于包大小限制并能够使用 Shiny Apps 的免费付费计划进行部署.

However, I also solved this issue by loading in R all CSV, XLSX files I was using, and then saving them as RDS files with saveRDS(). Then, you can load them with readRDS(). This will not reduce memory within R, but will substantially reduce the size of your files (in my case by almost one-third), allowing you to be below the bundle size limit and able to deploy with the free paid plan of Shiny Apps.

既然您提到文件最终位于应用程序的根文件夹中,这可能对您有所帮助,就像在我的情况下一样.

Since you mentioned that the files end up in the root folder of the app, this may help you as it did in my case.