how to solve 'Disconnected from the server' Problem with shiny app












0














I have a shiny-server Hosted in AWS r5.2xlarge Ubuntu-18.04 Instance, And I'm using It to deploy my work.
One of my Apps uses rpivotTable pkg to render a big data-frame and i get an error when i try to lunch this app with this data,but its working fine Locally in the server but i get 'Disconnected from the server' when i access to it remotely.
SO i created a date range filter to minimize the data. after that it's worked but when i expand this range i get the error again.
i reviewed the log files and there's no problem with them So any one can help me to solve this problem Or even give my a way to Boost the performance of rpivotTable rendering using something like Parallel package ?



This's my App code:



ui <- fluidPage(
theme = shinytheme("cerulean"),
titlePanel("Gross Profit"),
sidebarLayout(
sidebarPanel(
dateRangeInput('dateRange',
label = 'Date range input',
start = max(GrossProfitCube$Date) - 30, end = max(GrossProfitCube$Date)
),br(),
downloadButton('downloadData', 'Download All Data as CSV'), br(),br(),

width = 3
),

mainPanel(
tabsetPanel(
tabPanel("Sales pivot",withSpinner(rpivotTableOutput("pivot")),style = "font-size: 85%; width: 84%")

)
)
)
)
server <- function(input, output, session) {

Data <- reactive({
GrossProfitCube %>% filter(Date >= input$dateRange[1] , Date <= input$dateRange[2])
})
output$pivot <- renderRpivotTable({
rpivotTable(data = Data(), aggregatorName = "Sum", rendererName = "Table"
,hiddenFromAggregators = colnames(GrossProfitCube)[c(1:17)]
,hiddenFromDragDrop = colnames(GrossProfitCube)[c(18:27)]
, width="50%", height="550px")
})

output$downloadData <- downloadHandler(
filename = 'GrossProfit.csv',
content = function(file) {
write.csv(Data(), file)
}
)
session$onSessionEnded(stopApp)
}

shinyApp(ui, server)









share|improve this question



























    0














    I have a shiny-server Hosted in AWS r5.2xlarge Ubuntu-18.04 Instance, And I'm using It to deploy my work.
    One of my Apps uses rpivotTable pkg to render a big data-frame and i get an error when i try to lunch this app with this data,but its working fine Locally in the server but i get 'Disconnected from the server' when i access to it remotely.
    SO i created a date range filter to minimize the data. after that it's worked but when i expand this range i get the error again.
    i reviewed the log files and there's no problem with them So any one can help me to solve this problem Or even give my a way to Boost the performance of rpivotTable rendering using something like Parallel package ?



    This's my App code:



    ui <- fluidPage(
    theme = shinytheme("cerulean"),
    titlePanel("Gross Profit"),
    sidebarLayout(
    sidebarPanel(
    dateRangeInput('dateRange',
    label = 'Date range input',
    start = max(GrossProfitCube$Date) - 30, end = max(GrossProfitCube$Date)
    ),br(),
    downloadButton('downloadData', 'Download All Data as CSV'), br(),br(),

    width = 3
    ),

    mainPanel(
    tabsetPanel(
    tabPanel("Sales pivot",withSpinner(rpivotTableOutput("pivot")),style = "font-size: 85%; width: 84%")

    )
    )
    )
    )
    server <- function(input, output, session) {

    Data <- reactive({
    GrossProfitCube %>% filter(Date >= input$dateRange[1] , Date <= input$dateRange[2])
    })
    output$pivot <- renderRpivotTable({
    rpivotTable(data = Data(), aggregatorName = "Sum", rendererName = "Table"
    ,hiddenFromAggregators = colnames(GrossProfitCube)[c(1:17)]
    ,hiddenFromDragDrop = colnames(GrossProfitCube)[c(18:27)]
    , width="50%", height="550px")
    })

    output$downloadData <- downloadHandler(
    filename = 'GrossProfit.csv',
    content = function(file) {
    write.csv(Data(), file)
    }
    )
    session$onSessionEnded(stopApp)
    }

    shinyApp(ui, server)









    share|improve this question

























      0












      0








      0







      I have a shiny-server Hosted in AWS r5.2xlarge Ubuntu-18.04 Instance, And I'm using It to deploy my work.
      One of my Apps uses rpivotTable pkg to render a big data-frame and i get an error when i try to lunch this app with this data,but its working fine Locally in the server but i get 'Disconnected from the server' when i access to it remotely.
      SO i created a date range filter to minimize the data. after that it's worked but when i expand this range i get the error again.
      i reviewed the log files and there's no problem with them So any one can help me to solve this problem Or even give my a way to Boost the performance of rpivotTable rendering using something like Parallel package ?



      This's my App code:



      ui <- fluidPage(
      theme = shinytheme("cerulean"),
      titlePanel("Gross Profit"),
      sidebarLayout(
      sidebarPanel(
      dateRangeInput('dateRange',
      label = 'Date range input',
      start = max(GrossProfitCube$Date) - 30, end = max(GrossProfitCube$Date)
      ),br(),
      downloadButton('downloadData', 'Download All Data as CSV'), br(),br(),

      width = 3
      ),

      mainPanel(
      tabsetPanel(
      tabPanel("Sales pivot",withSpinner(rpivotTableOutput("pivot")),style = "font-size: 85%; width: 84%")

      )
      )
      )
      )
      server <- function(input, output, session) {

      Data <- reactive({
      GrossProfitCube %>% filter(Date >= input$dateRange[1] , Date <= input$dateRange[2])
      })
      output$pivot <- renderRpivotTable({
      rpivotTable(data = Data(), aggregatorName = "Sum", rendererName = "Table"
      ,hiddenFromAggregators = colnames(GrossProfitCube)[c(1:17)]
      ,hiddenFromDragDrop = colnames(GrossProfitCube)[c(18:27)]
      , width="50%", height="550px")
      })

      output$downloadData <- downloadHandler(
      filename = 'GrossProfit.csv',
      content = function(file) {
      write.csv(Data(), file)
      }
      )
      session$onSessionEnded(stopApp)
      }

      shinyApp(ui, server)









      share|improve this question













      I have a shiny-server Hosted in AWS r5.2xlarge Ubuntu-18.04 Instance, And I'm using It to deploy my work.
      One of my Apps uses rpivotTable pkg to render a big data-frame and i get an error when i try to lunch this app with this data,but its working fine Locally in the server but i get 'Disconnected from the server' when i access to it remotely.
      SO i created a date range filter to minimize the data. after that it's worked but when i expand this range i get the error again.
      i reviewed the log files and there's no problem with them So any one can help me to solve this problem Or even give my a way to Boost the performance of rpivotTable rendering using something like Parallel package ?



      This's my App code:



      ui <- fluidPage(
      theme = shinytheme("cerulean"),
      titlePanel("Gross Profit"),
      sidebarLayout(
      sidebarPanel(
      dateRangeInput('dateRange',
      label = 'Date range input',
      start = max(GrossProfitCube$Date) - 30, end = max(GrossProfitCube$Date)
      ),br(),
      downloadButton('downloadData', 'Download All Data as CSV'), br(),br(),

      width = 3
      ),

      mainPanel(
      tabsetPanel(
      tabPanel("Sales pivot",withSpinner(rpivotTableOutput("pivot")),style = "font-size: 85%; width: 84%")

      )
      )
      )
      )
      server <- function(input, output, session) {

      Data <- reactive({
      GrossProfitCube %>% filter(Date >= input$dateRange[1] , Date <= input$dateRange[2])
      })
      output$pivot <- renderRpivotTable({
      rpivotTable(data = Data(), aggregatorName = "Sum", rendererName = "Table"
      ,hiddenFromAggregators = colnames(GrossProfitCube)[c(1:17)]
      ,hiddenFromDragDrop = colnames(GrossProfitCube)[c(18:27)]
      , width="50%", height="550px")
      })

      output$downloadData <- downloadHandler(
      filename = 'GrossProfit.csv',
      content = function(file) {
      write.csv(Data(), file)
      }
      )
      session$onSessionEnded(stopApp)
      }

      shinyApp(ui, server)






      r shiny shiny-server






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 21 '18 at 13:23









      omarahmedm93

      187




      187
























          0






          active

          oldest

          votes











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53413018%2fhow-to-solve-disconnected-from-the-server-problem-with-shiny-app%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.





          Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


          Please pay close attention to the following guidance:


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53413018%2fhow-to-solve-disconnected-from-the-server-problem-with-shiny-app%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Wiesbaden

          Marschland

          Dieringhausen