1Panel-dev / 1Panel-dev/1Panel
[Bug] CPU Spike Caused by WAF Cleanup in 1Panel-Agent After Midnight
Open
@wanghe-fit2cloud is already working on this.
Since Aug 20, 2026.
type: optimization
- Dominant language
- Go
- Stars
- 37k
- Forks
- 3.4k
- Avg merge
- 9h 16m
- Merged PRs (30d)
- 105
Description
Contact Information
No response
1Panel Version
1Panel v2.2.5专业版
Problem Description
7.4G /opt/1panel/apps/openresty/openresty/1pwaf/data/db/waf/nginx_logs.db
1.5G /opt/1panel/apps/openresty/openresty/1pwaf/data/db/waf/attack_logs.db
1.3G /opt/1panel/apps/openresty/openresty/1pwaf/data/db/waf/req_uris.db
1.3G /opt/1panel/apps/openresty/openresty/1pwaf/data/db/waf/uris.db
763M /opt/1panel/apps/openresty/openresty/1pwaf/data/db/waf/match_values.db
waf数据库存储过大,每天0点之后1panel-agent cpu占用飙升至40%以上、大量读写磁盘,且持续10多分钟,出现过一次磁盘IO读写上限导致服务器挂掉,希望优化并修复这个问题
Steps to Reproduce
需要1panel绑定较多网站且waf拦截记录很多
The expected correct result
No response
Related log output
Additional Information
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.