Atmosphere timeout issue with tomcat 7.0.39
Asked Answered
H

1

1

I tried various combinations and always get a timeout I can't change through configuration as indicated in documentation.

Here is part of my 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>

When I set org.atmosphere.websocket.maxIdleTime, the timeout is immediat and it does not work at all.

Changing org.atmosphere.cpr.CometSupport.maxInactiveActivity seems to have no impact. It always timeouts after 1 minute.

I tried each parameter alone, and together.

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

I also tried that:

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

Thanks!


Update As a work around, I upgraded to 1.1.0.RC1 and used this:

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

This is a great addition.

Still I can't configure the server side timeout.

Hissing answered 30/4, 2013 at 22:27 Comment(0)
S
1

Please file an issue on Github so it gets fixed for RC2.

Snips answered 1/5, 2013 at 21:37 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.