[jboss-jira] [JBoss JIRA] (WFLY-7229) WFLYCLWEBUT0001 for server-side invalidated sessions

Paul Ferraro (JIRA) issues at jboss.org
Mon Oct 3 09:55:00 EDT 2016


    [ https://issues.jboss.org/browse/WFLY-7229?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13301669#comment-13301669 ] 

Paul Ferraro commented on WFLY-7229:
------------------------------------

> It was coded because two standard mechanisms you mentioned were considered not sufficient. I'm not saying they didn't work - they did and still do, but we wished to free resources faster than they can. I didn't say that earlier, but there are actually +30 sessions per user to wipe (+30 apps we thought we needed coordinated logout for, to free resources).

The code in MainServlet will not free resources any faster than the standard mechanism.  The distributed session manager in WF 10 does not rely on a polling mechanism (like older releases did), but instead schedules expiration eagerly.  Thus sessions will be destroyed as soon as they are sufficiently idle.

> Now, in WF 10.1 (and only there) it's logging errors.

It's logging errors because this doesn't work in WF10.  In WF10, the distributed HttpSession is not a traditional map of attributes, but rather a proxy to a distributed cache in which the session attributes are stored.  This proxy is only functional within the context of a container thread (e.g. request thread, listener thread, async context thread, etc.).

> If I understood you right - then this is quite possibly what I want to happen.

I don't think you understood me fully.  This would result in premature expiration.  If a request fails over to another node, and the original node is still alive, it will expire the session even though it is still being used.  I highly doubt that this is what you want to happen.

> WFLYCLWEBUT0001 for server-side invalidated sessions
> ----------------------------------------------------
>
>                 Key: WFLY-7229
>                 URL: https://issues.jboss.org/browse/WFLY-7229
>             Project: WildFly
>          Issue Type: Bug
>          Components: Clustering, Web (Undertow)
>    Affects Versions: 10.1.0.Final
>         Environment: Happens whenever <distributable/> is used in web.xml, both in standalone and domain modes.
>            Reporter: Michał Nowakowski
>            Assignee: Paul Ferraro
>         Attachments: stacktrace_01.txt, stacktrace_02.txt, stacktrace_03.txt, testPortlet.tar.gz
>
>
> Attached is a simple webapp (pardon the name) with a single servlet "/main", that does the following:
> - a session is assigned (or created, if none existed before)
> - its details are printed and the browser is told to refresh after 20 seconds
> - before the browser refreshes, the session is invalidated server-side by separate thread.
> Expected behaviour is, that WF should give the user a new session. That's indeed how it works in standalone mode and without <distributable/> in web.xml. But in domain mode, OR with <distributable/> added (and, possibly, full-ha profile chosen), I get errors:
> - The first stacktrace happens when the thread invalidates the session.
> - The second stacktrace happens, when the browser refreshes. The user sees "Error 500".
> - Then, after a minute or so, I get the last one. It then repeats periodically.
> We can't upgrade from 10.0 because of this - and we know we need an upgrade because of fixes in Infinispan.



--
This message was sent by Atlassian JIRA
(v6.4.11#64026)



More information about the jboss-jira mailing list