I have multiple shiny app on shiny-server (ubuntu 18) and when i ask to download data, if its big data, downloadHandler create infinite loop, and in temp, it write the output file, delete and write again. This happens with Firefox Browser.

If i use google-Chrome browser, i have no error, just download empty file.

If i use local shiny app, its work.

I try to up the time in shiny config file (app_init_timeout 3600; app_idle_timeout 3600; and http_keepalive_timeout 3600), but i don't see any change.

I try to this code on my shiny app ui.R file

HTML(
      "
          <script>
          var socket_timeout_interval
          var n = 0
          $(document).on('shiny:connected', function(event) {
          socket_timeout_interval = setInterval(function(){
          Shiny.onInputChange('count', n++)
          }, 150000)
          });
          $(document).on('shiny:disconnected', function(event) {
          clearInterval(socket_timeout_interval)
          });
          </script>
          "
    )

And i use this for user can upload big file, in server.R file

options(shiny.maxRequestSize = 2000*1024^2)

I use R 3.5.1

0 Answers