Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Max session limit reached #3966

Closed
ruibaby opened this issue May 18, 2023 · 7 comments
Closed

Max session limit reached #3966

ruibaby opened this issue May 18, 2023 · 7 comments
Assignees
Labels
area/core Issues or PRs related to the Halo Core kind/improvement Categorizes issue or PR as related to a improvement.

Comments

@ruibaby
Copy link
Member

ruibaby commented May 18, 2023

是什么版本出现了此问题?

2.5.2

使用的什么数据库?

PostgreSQL

使用的哪种方式部署?

Docker Compose

在线站点地址

https://ryanc.cc

发生了什么?

如图:

image

可复现步骤:使用 Basic Auth 请求任意接口达到 1w 次左右可触发,重启可以解决。

目前不清楚这个限制会带来什么样的问题,需要检查一下。

/kind improvement
/area core

相关日志输出

No response

附加信息

No response

@f2c-ci-robot f2c-ci-robot bot added kind/improvement Categorizes issue or PR as related to a improvement. area/core Issues or PRs related to the Halo Core labels May 18, 2023
@guqing
Copy link
Member

guqing commented May 18, 2023

image

@lixuejun725
Copy link

这个问题目前进一步有提供在相关文件最大数配置选项吗

@JohnNiang
Copy link
Member

Hi @lixuejun725 ,Spring WebFlux 确实没有提供对应的配置,不过我们看能否自定义。

/assign

@JohnNiang
Copy link
Member

这个问题目前进一步有提供在相关文件最大数配置选项吗

即使提供了最大数配置选项,也有可能会因为 session 过多造成 OOM。比较好的策略是:每个用户只能有一个 Session。

如果通过接口请求主题端页面,将会为每一次请求都创建一个 Session,但 Session 又需要 30 分钟后才会失效,这就很容易造成 Session 堆积,触发最大 Session 限制。

建议优化一下测试流程,首先通过用户名和密码登录后保存好 Cookie - SESSION,接下来的每次请求携带 Cookie,这样就不会那么容易触发 Session 限制。

@ruibaby
Copy link
Member Author

ruibaby commented Jun 30, 2024

@halo-dev/sig-halo 在 #5757 中引入 Spring Session 之后,是否已经可以规避此问题?

@JohnNiang
Copy link
Member

@halo-dev/sig-halo 在 #5757 中引入 Spring Session 之后,是否已经可以规避此问题?

暂时没有这个限制了。并且优化了匿名用户的 Session 机制,目前只有登录用户才会创建对应的 Session。

/close

@f2c-ci-robot f2c-ci-robot bot closed this as completed Jun 30, 2024
Copy link

f2c-ci-robot bot commented Jun 30, 2024

@JohnNiang: Closing this issue.

In response to this:

@halo-dev/sig-halo 在 #5757 中引入 Spring Session 之后,是否已经可以规避此问题?

暂时没有这个限制了。并且优化了匿名用户的 Session 机制,目前只有登录用户才会创建对应的 Session。

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/core Issues or PRs related to the Halo Core kind/improvement Categorizes issue or PR as related to a improvement.
Projects
None yet
Development

No branches or pull requests

4 participants