From owner-freebsd-questions Tue Nov 24 12:55:08 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id MAA04941 for freebsd-questions-outgoing; Tue, 24 Nov 1998 12:55:08 -0800 (PST) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from eagle.ns.net (eagle.ns.net [204.75.146.20]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id MAA04913 for ; Tue, 24 Nov 1998 12:55:06 -0800 (PST) (envelope-from rfg@monkeys.com) Received: from monkeys.com (rfg.ns.net [207.159.10.82]) by eagle.ns.net (8.8.5/8.8.5) with ESMTP id MAA19748 for ; Tue, 24 Nov 1998 12:55:02 -0800 (PST) Received: from monkeys.com (rfg@localhost [127.0.0.1]) by monkeys.com (8.8.8/8.8.5) with ESMTP id MAA00825 for ; Tue, 24 Nov 1998 12:54:43 -0800 To: freebsd-questions@FreeBSD.ORG Subject: Outbound Connections Limit == 4K (?) From: "Ronald F. Guilmette" Date: Tue, 24 Nov 1998 12:54:42 -0800 Message-ID: <818.911940882@monkeys.com> X-Deadbolt-Note: Deadbolt(tm) Personal E-Mail Filter, Version 0.95 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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