You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Keycloak会话过期后频繁出现502网关错误问题求助

Keycloak会话过期后出现502 Bad Gateway问题
  • 会话数据存储在Cookie中,会话过期支持多种方式(如Session Max、Session Idle),可通过界面配置控制。
  • 无论会话因何种原因超时,会话结束后所有Keycloak页面(包括登录页)都会出现502 Bad Gateway错误,导致无法访问;手动删除浏览器Cookie后可恢复正常访问。
  • 预期行为:会话过期后应自动重定向至认证页面,要求用户重新输入凭据。
  • 为复现问题,已将Session max timeout设置为2分钟,当前会话与Token设置见对应截图。

以下是运行Keycloak的K8s ConfigMap配置:

apiVersion: v1
data:
  postgresql.conf: |2

    # postgresql config
    # - SSL -
    # ssl = off
    # ssl_cert_file = '/opt/bitnami/postgresql/certs/tls.crt'
    # ssl_key_file = '/opt/bitnami/postgresql/certs/tls.key'

    max_connections = 100
    shared_buffers = 128MB
kind: ConfigMap
metadata:
  labels:
    app: keyclaok-2023070509560575-df
    companyId: 64623d28c01f7e3bf2919b6b
    databaseId: 64a53e355aecf20001998ee1
    deployedName: keyclaok-2023070509560575
    vpcId: 6462a2ab2eed1f0001aa7235
  name: keyclaok-2023070509560575-df
  namespace: keycloak

内容的提问来源于stack exchange,提问作者Salman Ahsan

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.14 05:52:50