# Adguard crashes all the time: out of memory

**URL:** <https://forum.gl-inet.com/t/adguard-crashes-all-the-time-out-of-memory/52828>\
**Category:** Router\
**Created:** [January 7, 2025, 10:27pm UTC](https://forum.gl-inet.com/t/adguard-crashes-all-the-time-out-of-memory/52828 "2025-01-07T22:27:02Z")\
**Posts on this page:** 7\
**Page:** 6

<div class="post-metadata">

**Author:** ![rjc862003](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/r/f4b2a3/32.png) [@rjc862003](https://forum.gl-inet.com/u/rjc862003)\
**Post date:** [May 13, 2026, 4:46pm UTC](https://forum.gl-inet.com/t/adguard-crashes-all-the-time-out-of-memory/52828/104 "2026-05-13T16:46:18Z")

</div>

did you check and make sure that adguardhome is actually writing to that dir

the directory tree should look something like this if it is

root@GL-BE9300:/tmp/mountd/disk1\_part1/adguardhome# tree -p  
[drwxr-xr-x] .  
├── [-rw-------] config.yaml  
└── [drwx------] data  
├── [drwx------] filters  
│ ├── [-rw-------] 1.txt  
│ └── [-rw-------] 1769827495.txt  
├── [-rw-------] querylog.json  
├── [-rw-------] querylog.json.1  
├── [-rw-------] sessions.db  
└── [-rw-------] stats.db

if its not writing to that dir then check the permissions with the above tree command

opkg update && opkg install tree

---

<div class="post-metadata">

**Author:** ![will.qiu](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/w/b38774/32.png) [@will.qiu](https://forum.gl-inet.com/u/will.qiu)\
**Post date:** [May 15, 2026, 3:40am UTC](https://forum.gl-inet.com/t/adguard-crashes-all-the-time-out-of-memory/52828/105 "2026-05-15T03:40:30Z")

</div>

> [@rjc862003](#):
>
> its come to my attention that the gli shipped version of AGH may not respect the given -c and -w flags for path to storage

We tried this method locally using BE9300 v4.9, and it seems to be working fine.

 ![image](https://forum-static.gl-inet.com/original/3X/a/8/a85c336c0fe42df38cf0e2ff5224eff6b94014c6.png)

> [@rjc862003](#):
>
> ├── [-rw-------] querylog.json  
> ├── [-rw-------] querylog.json.1

In addition, it appears that your issue was caused by manually modifying the `config.yaml` file to write logs to storage.  
By default, these files shoudl not be created.

```auto
querylog:
  dir_path: ""
  ignored: []
  interval: 2160h
  size_memory: 1000
  enabled: true
  ignored_enabled: false
  file_enabled: false

```

---

<div class="post-metadata">

**Author:** ![will.qiu](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/w/b38774/32.png) [@will.qiu](https://forum.gl-inet.com/u/will.qiu)\
**Post date:** [May 15, 2026, 3:43am UTC](https://forum.gl-inet.com/t/adguard-crashes-all-the-time-out-of-memory/52828/106 "2026-05-15T03:43:28Z")

</div>

Please check the size of the imported filter lists:

```bash
du -sh /tmp/mountd/disk1_part1/adguardHome/data/filters/

```

These lists still need to be loaded into memory during runtime, and moving the working directory to another storage path will not change that.

If the size is too large, we recommend reducing the number of filters.

---

<div class="post-metadata">

**Author:** ![DaHype](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/d/4af34b/32.png) [@DaHype](https://forum.gl-inet.com/u/DaHype)\
**Post date:** [May 15, 2026, 11:05am UTC](https://forum.gl-inet.com/t/adguard-crashes-all-the-time-out-of-memory/52828/107 "2026-05-15T11:05:10Z")

</div>

Yes full permissions. I think maybe it´s because i use hints and hyperlocal?

The lists are bigger i use. Only so i can get 97% auf blocking. I use some Hagezi and Steve black too.

---

<div class="post-metadata">

**Author:** ![DaHype](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/d/4af34b/32.png) [@DaHype](https://forum.gl-inet.com/u/DaHype)\
**Post date:** [May 15, 2026, 11:14am UTC](https://forum.gl-inet.com/t/adguard-crashes-all-the-time-out-of-memory/52828/108 "2026-05-15T11:14:16Z")

</div>

Yes you are right. I use some bigger lists, but i see the size now from that lists only in extern storage, no more on router. I checked with SCP and the files gone in internal storage.

I also set the memory limit in init.d/adguardhome to prevent from out of memory problems.

So to get more free Ram on Flint2 i have to install and run Adguard on an extern drive completely?

---

<div class="post-metadata">

**Author:** ![rjc862003](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/r/f4b2a3/32.png) [@rjc862003](https://forum.gl-inet.com/u/rjc862003)\
**Post date:** [May 15, 2026, 2:22pm UTC](https://forum.gl-inet.com/t/adguard-crashes-all-the-time-out-of-memory/52828/109 "2026-05-15T14:22:31Z")

</div>

yes ofc lists need to be loaded into ram thats not disputable

but I don’t have any issues with agh running out of memory

I use the full hagezi pro plus

memory usage is never above 60% uptime 37 weeks as of this post on my flint3

but if you have query logging on which is useful you will run out of ram if the querylog is placed in ramfs which is the default (but only if you enable query logging which is disabled by default)

I don’t know what lists you are using but more is not better use ONE list that covers what’s needed

but once a filter is loaded into ram the ram usage from AHG should mostly be unchanging

---

<div class="post-metadata">

**Author:** ![Hedwig](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/h/9e8a1a/32.png) [@Hedwig](https://forum.gl-inet.com/u/Hedwig)\
**Post date:** [June 12, 2026, 11:04am UTC](https://forum.gl-inet.com/t/adguard-crashes-all-the-time-out-of-memory/52828/110 "2026-06-12T11:04:22Z")

</div>

Found a good lead to solve the troubles:

> **Cause:** AdGuardHome's QUIC / H3 upstreams kept timing out over your LTE link. Each timed-out query held a goroutine open; with 300 goroutines and a 4096 cache, stuck queries piled up until AGH consumed ~150 MB+ RAM with no swap. RAM hit ~97% used, the kernel spent all its time reclaiming memory (71-81% sys CPU, load average 16-20), and everything depending on AGH for DNS stalled — including the GL web UI's startup API calls. SSH worked because dropbear needs no DNS.
> 
> **Solution:** Two things, both via SSH right now.
> 
> 1. Switch AGH upstreams from QUIC to plain DoH/UDP (maybe shrink cache + goroutines)

[Previous page](https://forum.gl-inet.com/t/adguard-crashes-all-the-time-out-of-memory/52828.md?page=5)
