跳转至

Gerrit 修改session超时

本文信息

创建时间: 2022.03.23 19:40:31

更新时间: 2022.10.10 21:10:15

修改gerrit.config

修改或新增如下字段

Properties
[cache "web_sessions"]
  maxAge = 2w

提示

2w代表session timeout是2周,其他时间分别为 s, m, h, d, w, mon, y

重新载入配置

Bash
gsh gerrit reload-config

重启docker容器(可选)

如果上面配置不生效,重启gerrit的容器

参考


Maximum age to keep an entry in the cache. Entries are removed from the cache and refreshed from source data every maxAge interval. Values should use common unit suffixes to express their setting:

  • s, sec, second, seconds
  • m, min, minute, minutes
  • h, hr, hour, hours
  • d, day, days
  • w, week, weeks (1 week is treated as 7 days)
  • mon, month, months (1 month is treated as 30 days)
  • y, year, years (1 year is treated as 365 days)

If a unit suffix is not specified, seconds is assumed. If 0 is supplied, the maximum age is infinite and items are never purged except when the cache is full.
Default is 0, meaning store forever with no expire, except:

  • "adv_bases": default is 10 minutes
  • "ldap_groups": default is 1 hour
  • "web_sessions": default is 12 hours