From 3f2853cbdff8b041266a13d4ae48ea8a119d73b0 Mon Sep 17 00:00:00 2001 From: Christian Kaczmarek Date: Wed, 20 Aug 2025 21:02:28 -0600 Subject: [PATCH] Add troubleshooting for Unbound rcvbuf warning Document solution for 'so-rcvbuf 1048576 was not granted' warning that commonly appears in Unbound logs. Resolves #539 Signed-off-by: Christian Kaczmarek --- docs/guides/dns/unbound.md | 48 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/docs/guides/dns/unbound.md b/docs/guides/dns/unbound.md index 7705e97..436fc10 100644 --- a/docs/guides/dns/unbound.md +++ b/docs/guides/dns/unbound.md @@ -269,6 +269,54 @@ Lastly, restart unbound: sudo service unbound restart ``` +### Common Issues & Troubleshooting + +#### Fix `so-rcvbuf` warning in unbound + +The configuration in `/etc/unbound/unbound.conf.d/pi-hole.conf` sets the **socket receive buffer size** for incoming DNS queries to a higher-than-default value in order to handle high query rates: + +```bash +so-rcvbuf: 1m +``` + +As a result, you may see this warning in unbound logs: + +```bash +so-rcvbuf 1048576 was not granted. Got 425984. To fix: start with root permissions(linux) or sysctl bigger net.core.rmem_max(linux) or kern.ipc.maxsockbuf(bsd) values. +``` + +To fix it: + +1. Check the current limit. This will show something like `net.core.rmem_max = 425984`: + + ```bash + sudo sysctl net.core.rmem_max + ``` + +2. Temporarily increase the limit to match unbound's request: + + ```bash + sudo sysctl -w net.core.rmem_max=1048576 + ``` + +3. Make it permanent. Edit `/etc/sysctl.conf` and add or edit the line: + + ```bash + net.core.rmem_max=1048576 + ``` + +4. Save and apply: + + ```bash + sudo sysctl -p + ``` + +5. Restart unbound: + + ```bash + sudo service unbound restart + ``` + ### Uninstall `unbound` To remove `unbound` from your system run