This forum has been archived. Please start a new discussion on GitHub.

What happens to the session when Glacier2 dies?


I noticed that if Glacier2 router suddenly goes away, all the sessions created by it remain abandoned. Clearly, a session can't get destroy() from the router anymore. Yet, I guess there must be some mechanism in the session itself (or in its SessionManager) that would destroy it in such a case. My concern is that after a sudden failure of a router we're going to have a bunch of zombie sessions elsewhere throughout the system. What would you suggest? Do I miss something in the configuration files?

In my test case I run Glacier2 and a simple server with SSLSessionManager and a few servants. Then I abort the router with "kill -9", so it can't destroy the session gracefully. Environment: ICE 3.2.1, Java 6, Ubuntu 7.10.


~ Andrey


  • benoit
    benoit Rennes, France

    If the router dies, the session manager sessions will indeed not be destroyed. If restarting the session manager isn't an option, you need to add a reaper thread to your session manager to destroy them.

    You'll find an example of how to implement such a reaper thread in the demo/Ice/session demo. You can use the same session timeout as the one configured for the Glacier2 router. This timeout can be retrieved programatically with the Glacier2::SessionControl::getSessionTimeout() method. The session control object object is provided to the your session manager create method by Glacier2.

  • Thanks. That's exactly what I wanted.

    ~ Andrey