shinyapps - User session is getting interrupted after approx. 45 seconds -


i have shiny application deployed on rshiny pro server(1.5.2).

application heavy computations , generates report without problem if gets completed before approximately 45 seconds.

if computation , report generation goes beyond approximately 45 seconds, user's session / connection server getting interrupted. automatically server reconnecting disconnected users immediately. after few seconds of re-connection user session getting reaped , user presented notwork error.

from above observations know reconnect flag enabled @ server.

i need understand-

  1. why user session getting interrupted around approximately 45 seconds every single time.
  2. how prevent session interruption? there configuration @ server or application side me achieve uninterrupted session between user , server?

well, after searching , trying out different options able find answers questions.

  1. the user session getting interrupted around approximately 45 seconds every single time because http_keepalive_timeout parameter not defined in server configuration , default value http_keepalive_timeout parameter 45 seconds.
  2. to prevent session getting reaped before report generation, added http_keepalive_timeout parameter shiny-server.conf @ top level , set it's value 120 seconds shown below.

    http_keepalive_timeout 120;

you can set http_keepalive_timeout value per wish. set 120 application taking around 100-110 seconds generate report.

reference: shiny server configuration enter image description here


Comments

Popular posts from this blog

networking - Vagrant-provisioned VirtualBox VM is not reachable from Ubuntu host -

c# - ASP.NET Core - There is already an object named 'AspNetRoles' in the database -

ruby on rails - ArgumentError: Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true -