Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 6 Jan 2001 23:40:02 -0800 (PST)
From:      "Ronald F. Guilmette" <rfg@monkeys.com>
To:        freebsd-doc@freebsd.org
Subject:   Re: docs/24125: connect(2) can yield EWOULDBLOCK/EAGAIN
Message-ID:  <200101070740.f077e2o26448@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR docs/24125; it has been noted by GNATS.

From: "Ronald F. Guilmette" <rfg@monkeys.com>
To: freebsd-gnats-submit@FreeBSD.org
Cc:  
Subject: Re: docs/24125: connect(2) can yield EWOULDBLOCK/EAGAIN
Date: Sat, 06 Jan 2001 23:38:28 -0800

 A brief follow-up on my own PR.
 
 I dug around in the networking parts of the kernel and found that 
 what was probably happening to cause EAGAIN errors to be issued
 in response to connect(2) call was a absence of available (auto
 assigned) port numbers for outgoing connections.
 
 /sbin/sysctl -a says (under default conditions):
 
 net.inet.ip.portrange.first: 1024
 net.inet.ip.portrange.last: 5000
 
 This leaves less than 4000 available auto-assigned port number for
 outgoing connections.  It appears that if those all get used up
 then connect(2) will start to yield -1 with errno set to EAGAIN.
 
 This should, of course, be documented in the ERRORS section of the
 connect(2) man page.
 
 Increasing the currently set value of net.inet.ip.portrange.last
 (via sysctl) seems to make the problem go away.
 
 


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-doc" in the body of the message




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