Nejc Škoberne-2 wrote:
> 
> Hello,
> 
> I've been trying to solve this problem by myself for a long time now, but
> no luck.
> I run a few dozens of FreeBSD 5.3/5.4 machines, which serve as routers,
> NAT boxes,
> Apache, Postfix, OpenVPN, ... servers. Most of them are low-cost PC
> machines since
> they are usually deployed to SOHO environments and the loads are rather
> low.
> 
> I am having problems with the "No buffer space available" error like this:
> 
>   Jul 18 08:49:36 Router openvpn[661]: write UDPv4: No buffer space
> available (code=55)
> 
> so this is obviously when OpenVPN tries to send UDP packets. And also like
> this:
> 
>   Jun 23 06:27:38 Router pdns[2182]: Unable to send a packet to our
> recursing
>   backend: No buffer space available
> 
> when PowerDNS DNS server tries to do some recursive work. I have been
> searching Google
> for a solution and I found out that the error should appear when the mbuf
> (or sfbuf?)
> is "full" and that I can print the current buffer status with 'netstat
> -m'.
> 
> Because the error would show up (and not only show up, but also block the
> network
> operability for that server) at random times, I set up the "swatch" daemon
> on all those
> servers, so that as soon as the error is logged in messages, I run this
> command:
> 
> #!/usr/local/bin/bash
> LOG=/var/log/swatch.log
> 
> datum=`date`
> echo "============== $datum ==============="
> sockstat >> $LOG
> echo "------------------------------------------------------------" >>
> $LOG
> netstat -n -a >> $LOG
> echo "------------------------------------------------------------" >>
> $LOG
> netstat -m >> $LOG
> echo "------------------------------------------------------------" >>
> $LOG
> ps ax >> $LOG
> echo "============================================================" >>
> $LOG
> 
> Even though the log was growing as I assumed, I couldn't find anything
> particulary
> interesting, because the "netstat -m" command issued by swatch (at the
> time of the
> error) still shows something like this:
> 
> 2 mbufs in use
> 1/17088 mbuf clusters in use (current/max)
> 0/6/4528 sfbufs in use (current/peak/max)
> 2 KBytes allocated to network
> 0 requests for sfbufs denied
> 0 requests for sfbufs delayed
> 1819 requests for I/O initiated by sendfile
> 7578 calls to protocol drain routines
> 
> I am not sure, but as I understand it, this means that the buffers are
> quite OK.
> 
> What would be the "proper" way to debug this problem? This is happening on
> machines
> with various hardware, from good old Pentium I with 32 MB RAM up to P4
> 3GHz, 1GB RAM,
> various network cards (mostly rtl8139), with ADSL or VDSL, although the
> errors are
> very rare at the VDSL boxes (where the upstream bandwidth is substantially
> greater).
> 
> So, usually the errors appear but the users don't bother really, so it
> looks like
> the problems goes away sometimes (the connection is restored), but
> sometimes reboot
> is needed.
> 
> Thanks for your ideas.
> 
> P.S.: If the output of the script above could be helpful, let me know, I
> can publish
> it somewhere.
> 
> Cheers,
> Nejc
> 

Hello Nejc!

Have you managed to solve this? I've just been having the same issue - I've
set up multiple OpenVPN connections with TAP-device (FreeBSD-5.3 as server,
5.4 as client, multiple 4.x as clients etc.) and the server gives the same
error regularly - I can't restart the server, the error occures every 30
minutes or so.. Do you know what's the deal with these buffers?

My netstat -m shows:
520 mbufs in use
515/128000 mbuf clusters in use (current/max)
0/5/6656 sfbufs in use (current/peak/max)
1160 KBytes allocated to network
0 requests for sfbufs denied
0 requests for sfbufs delayed
0 requests for I/O initiated by sendfile
9814 calls to protocol drain routines
-- 
View this message in context: 
http://www.nabble.com/No-buffer-space-available-error-tf1960830.html#a13644937
Sent from the freebsd-questions mailing list archive at Nabble.com.

_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to