1Panel-dev / 1Panel-dev/1Panel

[Bug] CPU Spike Caused by WAF Cleanup in 1Panel-Agent After Midnight

Open
#13,595 3 comments 0 reactions 1 assignee View on GitHub

@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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.