2013-04-30 42 views
1

我嘗試了各種組合,總是得到一個超時我無法通過配置文件中指出的方式來更改。tomcat的環境超時問題7.0.39

這裏是我的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,超時是immediat,並沒有在所有的工作。

更改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> 

這是一個很好的補充。

我仍然無法配置服務器端超時。

回答

1

Salut,

請在Github上提出問題,以便RC2得到修復。

謝謝!

- Jeanfrancois

+0

完成。謝謝! :) – unludo 2013-05-02 06:56:43

+1

https://github.com/Atmosphere/atmosphere/issues/1061 – Thilo 2013-07-31 10:06:02