Adguard Home randomly stops after a few days. How to get logs?

Hi,
I am new with OpenWRT. I am using Adguard Home as my DNS. Completely randomly, every 3 to 7 days, Adguard home stops. It is no longer accessible, and it means none of the devices on the network have DNS access (so no internet access). If I restart adguardhome manually, it fixes it.

I want more info on this issue. But I couldn't find any way to get logs for adguard home. I searched a lot on the internet, didn't find any way to get the logs of a specific openwrt service. How do I do that ?

Thanks in advance for your help.

1 Like

AGH remote, or installed on the router?

Thanks a lot for your answer.
I've installed it on the router, via opkg.
How do I get the logs ?

hi,

use logread to read syslog.

but likely you run out of space. you can check with df.

Or perhaps RAM.

I know from adguard query log that it stopped working at 8:00. When I use logread, it only goes up to 15:00. So I have nothing related to adguard in it. How can I get logs further in the past ?

How should I use df ?

You can't, it's a round robin, when it reaches max size, the oldest entry gets overwritten.

df -kh

You can increase the system log buffer size in the System settings (or in /etc/config/system). The default 64 kB is ridiculously small for modern routers. (I change the default size to 256 kB or 384 kB in my own builds).

1 Like

Beyond increasing the ringbuffer, it's also possible to relay the syslog to a remote syslog server for long term safekeeping.

1 Like

Which router you are using? Some routers might be lacking resources that you can't really run too many packages.

I don't think it would be because of the power of my router. It's an Asus RT-AX53U, at normal usage with some services enabled, (DynDNS, Upnp, Adguard...) I have still a lot of RAM / CPU left.

Logging to another device is interesting, I'll look into that to log on my rpi4.

Is Adguard stopping a known case ?

Iā€™m experiencing the same behavior.
Did you find a solution?

I'm having the same issue and I have plenty of disk space and free RAM. I don't see anything in the logs (I have remote logging set up so I can see the entire log). Seems to happen every few days for me too. The only way I can fix it is by running service adguardhome restart.

as a temp workaround, schedule an AGH service restart on a daily basis, in the middle of the night.

1 Like

I was just setting that up :slight_smile:

In case it helps anyone in the future:

# crontab -e

Paste the following into your crontab (sets it to restart at 4am every day):

0 4 * * * service adguardhome restart

Then restart cron:

# service cron restart

How has that worked out for you? I installed AGH yesterday and about 5 hours ago it hanged.

Weird thing, /etc/init.d/adguardhome shows running

Unfortunately my router has been having other unrelated difficulties so I haven't had a chance to run it for long without needing to restart it. It seems to have helped though, for what little time it has been up and running.

I'm having this same issue with WRT3200ACM

I ended up using adblock-fast as it does support the same filter lists as AdGuard.

1 Like

same problem here on a TP Link ER605 v2. I would switch to adblock-lean or something else, but as far as I can tell, adguardhome is the only one that allows you to assign different dns servers to different clients. If there is an alternative that can handle that use case then I'd be happy to switch. Adguard Home terminates pretty much every day for me even though service adguardhome status still shows running when this happens.

OpenWrt 23.05.0, r23497-6637af95aa
 -----------------------------------------------------
root@OpenWrt:~# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root                 2.8M      2.8M         0 100% /rom
tmpfs                   122.2M     76.0K    122.2M   0% /tmp
/dev/ubi0_7             100.7M     26.2M     69.8M  27% /overlay
overlayfs:/overlay      100.7M     26.2M     69.8M  27% /
tmpfs                   512.0K         0    512.0K   0% /dev
root@OpenWrt:~# free -h
              total        used        free      shared  buff/cache   available
Mem:         250340      135396       58996          76       55948       68616
Swap:             0           0           0
1 Like