mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2026-03-04 00:01:12 -05:00
Add a function to limit the GB filesize of the query log file #3480
Labels
No labels
P1: Critical
P2: High
P3: Medium
P4: Low
UI
bug
cannot reproduce
compatibility
dependencies
docker
documentation
duplicate
enhancement
enhancement
external libs
feature request
good first issue
help wanted
infrastructure
invalid
localization
needs investigation
performance
potential-duplicate
question
recurrent
research
snap
waiting for data
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/AdGuardHome#3480
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @DandelionSprout on GitHub (Feb 13, 2022).
Have a question or an idea? Please search it on our forum to make sure it was not yet asked. If you cannot find what you had in mind, please submit it here.
Prerequisites
Please answer the following questions for yourself before submitting an issue. YOU MAY DELETE THE PREREQUISITES SECTION.
Problem Description
Currently, the only method to limit the query log size's file, is by the amount of days the queries are stored. This works for 99.9% of AdGuard Home users, but can become a potential problem for those who run public servers with 100-ish weekly users. Keeping the query log time setting set to "30 days", has apparently led to an impressively large log file size of 9.2 GiB, becoming the 2nd-largest single file on my PC.

Proposed Solution
In addition to the amount of days queries can be stored, it should also be possible to set a max amount of GB (be it Linux-GB or GiB) or MB the file size can reach before the oldest entries are deleted.
Alternatives Considered
None that I'm currently aware of. Though I should probably have reduced the log days on my setup from 30 to 7 days either way.
Additional Information
The existing setting for the cache size (which I've set to 40 MB), doesn't seem to affect the query log's size.
@ainar-g commented on GitHub (Feb 14, 2022):
This may be partially addressed by #3404.
Which of the two ways would have the priority? I.e. if my log has reached the size limit but not the duration limit, should entries still be deleted?
@DandelionSprout commented on GitHub (Feb 14, 2022):
Correct. It'd be a "Whichever of the two that happens first" situation.
@Nahor commented on GitHub (Aug 25, 2022):
I think this issue can also be seen as a security problem. If a DNS client goes rogue, it can send a lot of requests just to fill the logs. This eventually can fill the storage device, especially on some machines like routers. Once the storage is full, things start to break down: recent queries are lost, filters don't get updated, stats are incorrect, ...
@imohitkr commented on GitHub (Jun 24, 2025):
Just happened with me , the log size went up to 30 GB
@sofmeright commented on GitHub (Jul 21, 2025):
+1 to this idea!
@siliconfire commented on GitHub (Jul 29, 2025):
+1
@irvis007 commented on GitHub (Nov 20, 2025):
same here ✋
logsize 30+ GB, some crap on mobile client wanted to reach malware address 7mln times in a 4 days 🌵