大约过后,用户会话被打断. 45秒 [英] User session is getting interrupted after approx. 45 seconds

查看:138
本文介绍了大约过后,用户会话被打断. 45秒的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Rshiny pro server(1.5.2)上部署了闪亮的应用程序.

I have the shiny application deployed on the Rshiny pro server(1.5.2).

如果应用程序在大约45 seconds之前完成,它会进行大量的计算并生成报告,而不会出现任何问题.

Application does some heavy computations and generates the report without any problem if it gets completed before approximately 45 seconds.

如果计算和报告生成时间超过了大约45秒,则用户与服务器的会话/连接将被中断.然后,服务器几乎立即自动reconnecting断开连接的用户. re-connection几秒钟后,用户会话开始收起,并向用户显示不工作错误.

If the computation and report generation goes beyond approximately 45 seconds, user's session / connection to the server is getting interrupted. Then automatically server is reconnecting the disconnected users almost immediately. After few seconds of re-connection the user session is getting reaped and user is presented with the notwork error.

从上面的观察中我们知道服务器上的reconnect标志是enabled.

From above observations we know that the reconnect flag is enabled at the server.

我需要帮助来了解-

  1. 为什么每次大约在45 seconds左右用户会话都被中断.
  2. 如何防止此会话中断?服务器或应用程序端是否有任何配置可以帮助我实现用户和服务器之间的不间断会话?
  1. Why the user session is getting interrupted around approximately 45 seconds every single time.
  2. How to prevent this session interruption? Is there any configuration at server or application side which will help me achieve uninterrupted session between user and server?

推荐答案

好吧,在搜索并尝试了不同的选项后,我能够找到问题的答案.

Well, after searching and trying out different options I was able to find the answers to my questions.

  1. 由于大约没有在server configuration中定义http_keepalive_timeout参数,并且default valuedefault value参数是45 seconds,因此用户会话每次大约被中断45秒.
  2. 为防止会话在报告生成之前被占用,我在top levelshiny-server.conf添加了参数并将其值设置为120 seconds如下所示.

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

http_keepalive_timeout 120;

http_keepalive_timeout 120;

您可以根据需要设置http_keepalive_timeout值.我将其设置为120,因为我的应用程序正在使用100-110 seconds来生成报告.

You can set the http_keepalive_timeout value as per your wish. I set it to 120 as my application is taking around 100-110 seconds to generate the report.

参考:发光的服务器配置

这篇关于大约过后,用户会话被打断. 45秒的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆