【问题标题】:Atmosphere timeout issue with tomcat 7.0.39tomcat 7.0.39 的气氛超时问题
【发布时间】:2013-04-30 22:27:24
【问题描述】:

我尝试了各种组合,但总是超时,我无法按照文档中的说明通过配置进行更改。

这是我的 web.xml 的一部分:

<servlet>
    <description>AtmosphereServlet</description>
    <servlet-name>AtmosphereServlet</servlet-name>
    <servlet-class>org.atmosphere.cpr.AtmosphereServlet</servlet-class>
    <init-param>
        <param-name>org.atmosphere.websocket.maxIdleTime</param-name>
        <!--10 minutes-->
        <param-value>600000</param-value>
    </init-param>
    <init-param>
        <param-name>org.atmosphere.cpr.CometSupport.maxInactiveActivity</param-name>
        <!--10 minutes-->
        <param-value>600000</param-value>
    </init-param>
    <async-supported>true</async-supported>
    <load-on-startup>2</load-on-startup>
</servlet>

当我设置 org.atmosphere.websocket.maxIdleTime 时,超时是即时的,它根本不起作用。

更改 org.atmosphere.cpr.CometSupport.maxInactiveActivity 似乎没有影响。它总是在 1 分钟后超时。

我单独尝试了每个参数,也一起尝试了。

timedout():424, AsynchronousProcessor {org.atmosphere.cpr}

我也试过了:

  AtmosphereRequest req = r.getRequest();
  // First, tell Atmosphere
  // to allow bi-directional communication by suspending.
  if (req.getMethod().equalsIgnoreCase("GET"))
  {
     r.suspend(10 * 60 * 1000);
  }

谢谢!


更新 作为解决方法,我升级到 1.1.0.RC1 并使用了这个:

    <init-param>
        <param-name>org.atmosphere.cpr.AtmosphereInterceptor</param-name>
        <param-value>org.atmosphere.interceptor.HeartbeatInterceptor</param-value>
    </init-param>

这是一个很好的补充。

我仍然无法配置服务器端超时。

【问题讨论】:

    标签: tomcat7 atmosphere


    【解决方案1】:

    请在 Github 上提交问题,以便为 RC2 修复。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-07-01
      • 1970-01-01
      • 2012-11-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-03-03
      • 1970-01-01
      相关资源
      最近更新 更多