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

磁盘占用过大? #6

Open
z104866 opened this issue May 22, 2024 · 6 comments
Open

磁盘占用过大? #6

z104866 opened this issue May 22, 2024 · 6 comments

Comments

@z104866
Copy link

z104866 commented May 22, 2024

老大我正式开始使用整套系统至今 差不多1个月, 我开了2个NestingDNS,一直都是正常使用, 直到这几天开始经常不正常.
发现我个overlay 空间有114G,但是使用了114G...现在overlay 100% 占用, 重启过机器之后发现docker 都起不来...
overlay 100% 满,老大有撒办法解决吗?
我目前是rm -rf /var/lib/docker ...docker service 能起来了....但是所有的需要重新部署了...

老大1个月之后估计又要来一次了,
我想直到到底是撒导致overlay满了? 有办法能控制吗?

@217heidai
Copy link
Owner

默认日志保存24小时,DNS过期缓存是7天,不会占用大量空间。可以进到$HOME/nestingdns/work/smartdns$HOME/nestingdns/log看下文件占用。

@z104866
Copy link
Author

z104866 commented May 23, 2024

发现问题了

  1. AdGuardHome的日志是默认保存在AdGuardHome/data/目录中的querylog.json文件。就算我设置日志保存时间为3天,那么3天后AdGuardHome其实并不会把日志删除,而是把当前的querylog.json改成querylog.json.1,然后再生成新的querylog.json记录日志。
  2. 我的querylog.json.1 有64G 大小,因为我有2个Adguard 所以加在一起,有100G的空间存放了这个没用的东西
    结果,磁盘就慢了
    3.临时解决方法就是脚本自动删除
    50 5 * * * [ -f /usr/bin/AdGuardHome/data/querylog.json.1 ] && rm /usr/bin/AdGuardHome/data/querylog.json.1

@217heidai
Copy link
Owner

这日志有点大,看了下我的才 15M。另外可以不用保留太长时间,一般只有排查问题时会翻日志。

@z104866
Copy link
Author

z104866 commented May 23, 2024

我的querylog.json...不大,但是querylog.json.1 ,这个用不到的东西在占空间大

@daselang
Copy link

daselang commented Aug 6, 2024

Settings > General Settings > Logs configuration
querylog_enabled: true
querylog_file_enabled: true
querylog_interval: 2160h
querylog_size_memory: 1000

https://forum.cloudron.io/topic/9047/adguard-querylog-json-at-2-gb

@217heidai
Copy link
Owner

日志只保留24小时,根据容器配置的 SCHEDULE="0 4 * * *" 参数,定时删除 AdGuardHome 归档日志 querylog.json.1。一般情况下日志只用在排查问题时开启,平时可以关闭或者减少保留时间。

querylog:
  dir_path: "/nestingdns/log"
  ignored: []
  interval: 24h
  size_memory: 1000
  enabled: true
  file_enabled: true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants