On Fri, May 07, 2010 at 11:01:19AM +0200, Christopher Zimmermann wrote:

> Hi, I got another question regarding this matter.
> How is the openfile count accounted for? Is it per process, per
> user, per shell? How does this work?
> 
> I recently had problems when running rtorrent, which used about 100
> file descriptors (sockets). Pjsua then failed with "Too many open
> files" (sockets, too), although it should not use more then three
> sockets.
> 
> I also once increased openfile-cur to 1024 for one shell, started an
> appilcation using many sockets (>200) and then applications on other
> shells with openfile-cur=128 would fail.
> 
> 
> 
> Christopher

There is an overall system limit, set with sysctl kern.maxfiles=n,
current in-use fds can be displayed with sysctl kern.nfiles.

There is also a per-process limit.  Processes inherit the limits from
the parent process, but can change the lmits via system calls (with
restrictions for non-seuperuser processes). 

Reading what you described above, it looks like you hit the
system-wide limit. 

        -Otto

Reply via email to