Date: Sun, 3 Aug 1997 11:26:41 -0600 (MDT) From: Marc Slemko <marcs@znep.com> To: "Andrew N. Edmond" <edmond@shaman.lycaeum.org> Cc: hackers@FreeBSD.ORG Subject: Re: Too many open files in System! Message-ID: <Pine.BSF.3.95.970803105843.18576G-100000@alive.znep.com> In-Reply-To: <Pine.BSF.3.96.970803072629.4490C-100000@necropolis.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 3 Aug 1997, Andrew N. Edmond wrote: > I am writing a multithreaded application (using MIT pthreads 1.6) that > MUST have thousands of open files, and nearly 4000 open sockets. I'm > getting this error when I try to accept on this many sockets: > > error on accept: Too many open files in system > > I set CHILD_MAX and OPEN_MAX to 4098 in the kernel, and I can't find a way > to get accept to open any more sockets. Any ideas? You say you need 4000 sockets and thousands of files. That adds up to >4098 descriptors. Have you tried increasing CHILD_MAX beyond 4098? Well, you can just do a sysctl to change kern.maxfiles and kern.maxfilesperproc which should have the same effect. Then check your ulimit -n and increase it if necessary, eg. $ su # ulimit -Hn unlimited # ulimit -n unlimited # ulimit -n and be sure it is high enough. What version is this on? Any sample minimal source code to demonstrate the problem you are having?
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.95.970803105843.18576G-100000>