After a long web idle period, bad gateway errors, clearing cookies fixes it

New guy here making great progress, but not there yet.

One thing that I am struggling with now is that when I step away from the computer for a while and come back to it, any attempt to browse a keycloak web site is met with a gateway timeout error. I left the browser when I was logged in as the initial admin user.

Somehow I stumbled upon the fact that if I clear the keycloak site cookies (or use a different browser) then the system works fine.

Can anyone suggest a lead on what to investigate here?

[edit - The sso login from the client application fails too. Not just the admin web login.]

In which environment do you recognize this behavior?
I’m seeing this occurring from time to time (not that often) in an AWS environment, nowhere else. Thus, I think this is related to some AWS infrastructure issue on the ALB. But I’m not 100% sure, only guessing as I don’t see this in other envs.

I’m running in a local lab LXD environment.

I have a main Ubuntu 22.04 LXD server with keycloak running on an LXD Ubuntu 22.04 Container. The single web entry point into the LXD subnet is an Nginx Reverse Proxy.

Basically my various server systems are separate LXD containers and keycloak is a sister container to all of those and is going to be the SSO for them all.

I am using a web browser on my home desktop machine to access into the LXD machines.

I’m wondering about how to best use the logout redirect urls in the keycloak settings. Maybe that is my problem. It sure seems like there is a timeout based logout that is getting messed up somewhere and preventing a renewal login. Front-channel logout, back-channel logout, need to read up on them.

I have mostly default keycloak realm settings. In the advanced tab tokens never expire, for instance is still set to default. But the realm settings seem to have a 30 minute timeout.

Bump.

Nobody else is seeing these timeout events where the only recover is clearing all cookies in the client user web session?