Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Nov 1998 12:54:42 -0800
From:      "Ronald F. Guilmette" <rfg@monkeys.com>
To:        freebsd-questions@FreeBSD.ORG
Subject:   Outbound Connections Limit == 4K (?)
Message-ID:  <818.911940882@monkeys.com>

next in thread | raw e-mail | index | archive | help

Is there some sort of a hard limit burried in the kernel someplace
(e.g. 4K) on the total number of outbound connections allowed from
a single FreeBSD system?

That's the impression I'm getting.

I have a system which is already configured to allow some un-Godly
number of total TCP connections (32K to be exact) and I've previously
run this same box up to something over 7K _incoming_ connections, so
I'm fairly sure that I have most of this stuff configured and built
right.  But when I try running one process, or even multiple processes,
which, in total, attempt to open up anything greater than around 4000
_outbound_ connections, one of the processes, at least, will consistantly
start to get EADDRNOTAVAIL errors back from its connect(2) call... and
this condition DOESN'T go away, even if I have the code delay a little
while (using sleep(2)) and then try again.

So anyway, I really do get the impression that I'm banging up against
some sort of invisible hard limit (4K ?) that is burried somewhere that
I'm not aware of.

If anybody can tell me where this limit is located, and how to increase
it, that would be most appreciated.

(Could the setting `kern.maxsockbuf: 262144' have anything to do with this?)

Oh yea, and by the way, I'm running 2.2.6 (if that matters).

P.S.  On a separate but related issue, it appears to me (based upon my
use of getrlimit/setrlimit) that if I have configured my system (via
sysctl(8)) so that the systemwide limit on open files (kern.maxfiles),
and the systemwide limit on TCP connections (kern.somaxconn) and the
per-process limit on open files (kern.maxfilesperproc) are all big
numbers (e.g. 32K) then a process which is run *AS ROOT* will have that
big value set as its hard limit for number of open files.  However re-
gardless of the settings of these kernel parameters, it seems that a
process which is run under any uid other than root is getting a hard
limit on max open files on 1024.  Why?  More to the point, where exactly
do I go to change (raise) this limit?

Thanks in advance for any answers.


-- Ron Guilmette, Roseville, California ---------- E-Scrub Technologies, Inc.
-- Deadbolt(tm) Personal E-Mail Filter demo: http://www.e-scrub.com/deadbolt/
-- Wpoison (web harvester poisoning) - demo: http://www.e-scrub.com/wpoison/

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



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