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 <kaczmar2@outlook.com>
This commit is contained in:
Christian Kaczmarek
2025-08-20 21:02:28 -06:00
parent a01d9c10ea
commit 3f2853cbdf

View File

@@ -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