【问题标题】:shiny - “The application failed to start: exited normally with code 137, signal 9 (SIGKILL)”闪亮 - “应用程序无法启动:正常退出,代码 137,信号 9 (SIGKILL)”
【发布时间】:2021-07-14 22:08:45
【问题描述】:


你好。


我正在开发一个闪亮的应用程序,一切都很好,直到我从我开始运行该应用程序以来一直使用的相同数据添加另一个可视化。当时,数据不到 1.5gb,但该应用在前几张图上运行良好。


在本地运行应用程序时,我没有收到任何错误,但是当我尝试发布它时,出现错误:“应用程序无法启动:正常退出,代码 137,信号 9 (SIGKILL)”。


我对此进行了调查,it mentioned 没有足够的闪亮内存,免费订阅的限制为 1gb。所以我把我的数据减少到不到 0.8gb,我把我在闪亮的东西上的所有东西都注释掉了,除了这段代码:

library(DT)
library(TTR)
library(dplyr)
library(derivmkts)
library(fresh)
library(highcharter)
library(lubridate)
library(shiny)
library(shinydashboard)
library(shinyWidgets)
library(tidyverse)
library(vroom)

tickers = vroom("tickers.csv",delim=",",col_types=cols()) 
termdf = vroom("termdf.csv",delim=",",col_types=cols())

#----------------------------------------------------------------------------#

ui <- {dashboardPage(
  dashboardHeader(title=""),
  dashboardSidebar(sidebarMenu(pickerInput(inputId="name",label="",choices=tickers,options=list('live-search'=T,size=6),width="100%"),
                               menuItem("Dashboard",tabName="db"),
                               menuItem("Relative Value",tabName="rv"),
                               menuItem("Earnings",tabName="er"),
                               menuItem("Calculator",tabName="calc"))),
  dashboardBody(
    tabItems(tabItem(tabName="db",
                     fluidRow(box(status="primary",DT::dataTableOutput("scan1"),width=12,collapsible=T)),
                     fluidRow(
                       tabBox(
                         tabPanel("Price Chart",highchartOutput("pxchart"))),
                       tabBox(
                         tabPanel("Volatility",highchartOutput("volchart")),
                         tabPanel("Skew",highchartOutput("skewchart")),
                         tabPanel("Contango",highchartOutput("conchart")))),
                     fluidRow(tabBox(tabPanel("Volatility Cone",highchartOutput("volcone"))),
                              tabBox(tabPanel("Option Volume",highchartOutput("ovchart")))),
                     fluidRow(tabBox(tabPanel("Skew Structure",highchartOutput("skewchart")),width=4),
                              tabBox(tabPanel("Term Structure",highchartOutput("termstr")),width=4),
                              tabBox(tabPanel("IV30 Spot Correlation",highchartOutput("ivpxchart")),width=4))))))
}

#----------------------------------------------------------------------------#

server <- function(input, output) {
  t0 = reactive({
    x = input$name
    x
  })
  output$pxchart = renderHighchart({
    t1 = t0()
    x1 = termdf %>% filter(ticker==t1)
    x2 = xts::xts(x1$priorCls,ymd(x1$tradeDate))
    
    highchart(type="stock") %>%
      hc_add_series(x2,type="line",name="Close Price") %>%
      hc_legend(enabled=T) %>%
      hc_rangeSelector(selected = 4) %>% 
      hc_add_theme(hc_theme_flatdark())
  })
}

#----------------------------------------------------------------------------#

shinyApp(ui = ui, server = server)


我只是试图在本地加载这段代码中的价格图表输出,但即使这样也没有加载。据我所知,我的实例大小不足...发生了什么/如何解决?

【问题讨论】:

    标签: r shiny shinydashboard


    【解决方案1】:

    当您寻求此类帮助时,您应该尝试给出一个可重现的示例。您给出的示例无法重现,因为它使用本地 csv 文件。

    看起来您有两个具有相同 ID "skewchart" 的输出。不允许使用具有相同 ID 的两个输出,这会导致您的 UI 失败,因为它会生成无效的 HTML。

    【讨论】:

      猜你喜欢
      • 2021-08-06
      • 1970-01-01
      • 2020-01-24
      • 2020-02-17
      • 2021-05-06
      • 2019-07-14
      • 2017-12-25
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多