You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Michał Więckowski <mi...@gmail.com> on 2020/05/11 14:30:05 UTC

Dissapearing attribute from session

Hello everyone,

I'm expecting bizarre behavior and  I'm slowly running out of options
what can be wrong. Maybe someone had a similar problem.

I've got a tapestry app (T5.5) and sometimes when I refresh pages (this
behavior I can see in many pages across my app), my session attributes are
lost. By "lost" I mean they are set as null, as they were never set. To be
more precise, I can observe this in a Map object that is stored in the
session.
I've observed that this loss is happening during a full page reload (in
other words, running ajax "hits" don't cause it).
What's more, this lost I can only see in my prod env (which in this case is
Azure). In my local development env, everything is working like a charm.

I know that this is only a brief description, but I don't even know what
details may be helpful with the solution to this problem.  Please ask and
thanks in advance.


-- 
regards,

MW

Re: Dissapearing attribute from session

Posted by Cezary Biernacki <ce...@gmail.com>.
Hi,
Usually such symptoms appear when your production system has multiple
instances with a load balancer but without the "sticky sessions" option
enabled. The load balancer sends request from one user to multiple
instances, so it looks like attributes from the session disappear, while in
reality they were set on a different instances. This problem is unrelated
to Tapestry itself.

If your configuration matches above, either reconfigure your load balancer
to send request from one user to the same instance, or save/restore
sessions on every request from some external database.

Best regards,
Cezary



On Mon, 11 May 2020, 16:30 Michał Więckowski, <mi...@gmail.com>
wrote:

> Hello everyone,
>
> I'm expecting bizarre behavior and  I'm slowly running out of options
> what can be wrong. Maybe someone had a similar problem.
>
> I've got a tapestry app (T5.5) and sometimes when I refresh pages (this
> behavior I can see in many pages across my app), my session attributes are
> lost. By "lost" I mean they are set as null, as they were never set. To be
> more precise, I can observe this in a Map object that is stored in the
> session.
> I've observed that this loss is happening during a full page reload (in
> other words, running ajax "hits" don't cause it).
> What's more, this lost I can only see in my prod env (which in this case is
> Azure). In my local development env, everything is working like a charm.
>
> I know that this is only a brief description, but I don't even know what
> details may be helpful with the solution to this problem.  Please ask and
> thanks in advance.
>
>
> --
> regards,
>
> MW
>