You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* fix: fixed can not set redis maxIdle & maxActive when use redis session, fix for issue #236
* refactor: add StoreConfig.MaxIdle & StoreConfig.MaxActive set redis maxIdle & maxActive
* refactor: add redisutil.GetDefaultRedisClient to returns the RedisClient of specified address
* refactor: update redisutil.GetRedisClient returns the RedisClient of specified address & maxIdle & maxActive
* opt: set defaultMaxIdle=10, defaultMaxActive=50 when use default redis config
* How to set redis maxIdle & maxActive when use redis session:
~~~ go
sessionConf := session.NewDefaultRedisConfig("redis://xx.xx.xx.xx:6379/0")
sessionConf.BackupServerUrl = "redis://xx.xx.xx.xx:6379/0"
sessionConf.CookieName = "dotweb-example.SessionID"
sessionConf.MaxIdle = 20
sessionConf.MaxActive = 100
~~~
* 2020-12-19 21:00 at ShangHai
Session在Redis存储模式下不支持自定义MaxActive、MaxIdle等参数设置,
默认MaxIdle=5,MaxActive=20,-->newPool函数,导致并发场景下Redis连接池耗尽,从而ctx.Session().Get("key"),获取有概率为nil,-->GetSessionState函数
The text was updated successfully, but these errors were encountered: