Adguard crashes all the time: out of memory

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

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

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.

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

Please check the size of the imported filter lists:

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.

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.

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?

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

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)