Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 1 Sep 2005 21:02:11 -0400
From:      bunny hero <bunnyhero@gmail.com>
To:        freebsd-questions@freebsd.org
Subject:   No buffer space available?
Message-ID:  <318d047105090118026a72b154@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
Recently my FreeBSD 4.10 server has been experiencing various
connection problems under heavy loads-- HTTP requests don't return,
connections to the MySQL server fail, and /var/log/messages contains
errors like:

Aug 31 19:19:16 main sendmail[77493]: j810JGQD077493: SYSERR(www):
makeconnection: cannot create socket: No buffer space available
Aug 31 19:25:57 main sshd[77700]: error: PAM: failed create sockets:
No buffer space available
Aug 31 19:53:02 main named[81]: socket(SOCK_RAW): No buffer space available
=20
I did some web searching, and read that I should do a netstat -m to
see if I am running out of mbufs. But if I understand it correctly,
the output of netstat seems to indicate that I am not running out of
mbufs?

258/2320/26624 mbufs in use (current/peak/max):
        156 mbufs allocated to data
        102 mbufs allocated to packet headers
131/938/6656 mbuf clusters in use (current/peak/max)
2456 Kbytes allocated to network (12% of mb_map in use)
0 requests for memory denied
0 requests for memory delayed
0 calls to protocol drain routines

Meanwhile, output of 'top' and 'vmstat' shows that my load average is
usually under 1.0 (even under heavy loads) and that my system is
hardly paging anything to disk (pi and po are usually 0)... although I
admit I'm not 100% certain how to interpret the rest of vmstat's
output or how it might apply.

Also, when I do netstat -s -p tcp during heavy traffic, "listen queue
overflows" increases at around 50-70 per second. I tried increasing
net.inet.ip.intr_queue_maxlen (from 50 to 1024 to 2048) but that
doesn't seem to make any difference.

I'm not sure what else to look for, or where to go from here. Should I
increase NMBCLUSTERS and/or NMBUFS anyway? Do I need more memory? Or
perhaps the hardware simply can't handle the number of connections
it's handling now?

My system is:
FreeBSD 4.10-SECURITY FreeBSD 4.10-SECURITY #0: Wed Jun 29 20:49:39
GMT 2005
Hardware: AMD Sempron 2600, 1G RAM, 80GB

Any tips, pointers would be greatly appreciated. Thank you very much!

wayne a. lee



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?318d047105090118026a72b154>