picketlink2 / federation

PicketLink v2.1.x Federation. PicketLink v2.5.x onwards is hosted at https://github.com/picketlink
http://www.picketlink.org
14 stars 29 forks source link

participants session in inTransitMap not release after global log out #198

Open junxiong opened 10 years ago

junxiong commented 10 years ago

During the global log out process, a set of all the participants will be put into the inTransitMap in the Identity Server, then the set will be cleared after the user successfully log out on each participant. But the entry of the participants set still remains in the inTransitMap, although it is very small, it will slowly consumes all the memory in the long run. We try to clear the entry if the set is empty, this will fix the memory leak issue, below is the gist for this issue. https://gist.github.com/junxiong/6971960

Even if we add the code to clear the entry in IdentityServer, it still leaks memory if the user does not choose to logout the system, for example, close the browser or just let the session time out. So we have to invoke the removeSession method in the IDPHttpSessionListener when session is going to destroyed, below is the gist for this issue https://gist.github.com/junxiong/6971992