tomcat 7.0.39的大气超时问题

问题描述 投票:1回答:1

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

这是我的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个回答
1
投票

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

© www.soinside.com 2019 - 2024. All rights reserved.