Skip to content

Commit 3f2853c

Browse files
committed
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 <[email protected]>
1 parent a01d9c1 commit 3f2853c

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

docs/guides/dns/unbound.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,54 @@ Lastly, restart unbound:
269269
sudo service unbound restart
270270
```
271271

272+
### Common Issues & Troubleshooting
273+
274+
#### Fix `so-rcvbuf` warning in unbound
275+
276+
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:
277+
278+
```bash
279+
so-rcvbuf: 1m
280+
```
281+
282+
As a result, you may see this warning in unbound logs:
283+
284+
```bash
285+
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.
286+
```
287+
288+
To fix it:
289+
290+
1. Check the current limit. This will show something like `net.core.rmem_max = 425984`:
291+
292+
```bash
293+
sudo sysctl net.core.rmem_max
294+
```
295+
296+
2. Temporarily increase the limit to match unbound's request:
297+
298+
```bash
299+
sudo sysctl -w net.core.rmem_max=1048576
300+
```
301+
302+
3. Make it permanent. Edit `/etc/sysctl.conf` and add or edit the line:
303+
304+
```bash
305+
net.core.rmem_max=1048576
306+
```
307+
308+
4. Save and apply:
309+
310+
```bash
311+
sudo sysctl -p
312+
```
313+
314+
5. Restart unbound:
315+
316+
```bash
317+
sudo service unbound restart
318+
```
319+
272320
### Uninstall `unbound`
273321
274322
To remove `unbound` from your system run

0 commit comments

Comments
 (0)