Application failed to start: 137

Hi I am able to run my app offline but when deploying it I get an error:

The application failed to start (exited with code 137).

`Attaching package: ‘dplyr’

The following objects are masked from ‘package:stats’:

filter, lag

The following objects are masked from ‘package:base’:

intersect, setdiff, setequal, union`

When I run the log I see the above message, as well as "Out of memory!". I am running quite a small app so I dont think memory is an issue, but if it is how do I check the size of my app?

My code:

#rm(list = ls())
library(shiny)
library(ggplot2)
library(readxl)
library(tidyr)
library(maps)
library(dplyr)

ui = fluidPage(
  sliderInput("day", label = "Date", 
              min = as.Date("2020-01-23","%Y-%m-%d"), 
              max = as.Date("2020-03-25","%Y-%m-%d"), 
              value = as.Date("2020-03-25","%Y-%m-%d")),
  plotOutput("plot")
  )

wuhan = read_excel("wuhan.xls", sheet = "cases")
colnames(wuhan)[5] = "country"
wuhan2=wuhan[,c(-1,-2,-3,-4)]
wuhan3 = wuhan2 %>% pivot_longer(-country,names_to="date",values_to="cases")
wuhan3$date = as.numeric(wuhan3$date)
wuhan3$date = as.Date(wuhan3$date, origin=as.Date("1899-12-31"))

base.map <- map_data("world")
map.data = left_join(base.map, wuhan3, by = c("region" = "country"))
map.data.nonna= map.data[complete.cases(map.data[ ,7]),]
map.data.na = map.data[is.na(map.data$date),]

server = function(input,output){
  
  data.subset = reactive({
    filtered = subset(map.data.nonna, date == input$day)
    test.with.na = rbind(filtered, map.data.na)
    test.with.na
  })
  
  output$plot = renderPlot({
    ggplot(data.subset(), aes(long, lat, group = group))+
      geom_polygon(aes(fill = cases), color = "grey")+
      scale_fill_distiller(palette="YlOrRd", direction=1, na.value = "grey") +
      theme_classic() +
      theme(panel.background = element_rect(colour = "white", fill="#ABDDDE"),
            axis.line=element_blank(), axis.ticks=element_blank(),
            axis.title = element_blank(), axis.text = element_blank())
  },
  height = 400,width = 600)
  }

shinyApp(ui, server)

This topic was automatically closed 54 days after the last reply. New replies are no longer allowed.