Re: [netatalk-admins] "too many files open"


Subject: Re: [netatalk-admins] "too many files open"
From: davids@fruitfly.bdgp.berkeley.edu
Date: Tue Dec 14 1999 - 15:19:26 EST


On 14 Dec, Chris Colburn wrote:
> When copying a large number of files (~2500 under a nest of folders) from
> a Sun Ultra 10 (Solaris 7) box running pre-asun-2.1.4-35 to a G4 running
> 8.6, things start to gack after copying about 45 files with a "An error
> occurred in copying "myfile" (too many files open)". Have I missed a
> configuration option somewhere, or did this get fixed in pre36a? If
> anyone has any ideas, please let me know.
>
>

>From the Solaris FAQ:

3.45) How can I increase the number of file descriptors per process?

In 2.3 in earlier this requires poking the kernel. In Solaris 2.4+, this can be accomplished by adding the following lines to
/etc/system:

        * set hard limit on file descriptors
        set rlim_fd_max = 4096
        * set soft limit on file descriptors
        set rlim_fd_cur = 1024

Raising the soft limit past 256 may confuse certain applications, especially BCP applications. Raising the limit past 1024
may confuse applications that use select(). Select() cannot use more than 1024 file descriptors at this time prior to Solaris
7. In Solaris 2.6, the RPC code was rewritten to use poll(), which does work with many more fds than select(). Prior to 2.6,
all RPC servers will likely crash and burn if you increase the fd soft limit past 1024.

Solaris 7 allows upto 65536 fds passed to select; this does require recompiling with a larger value for FD_SETSIZE.

Programs using stdio or even library calls that use stdio may break when they have more than 256 files open as that is the
stdio limit. Programs using many filedescriptors should try and reserve a number of low numbered file descriptors for use
by stdio.

The stdio limit is removed for 64 bit applications in Solaris 7; if you really need more than 256 FILE * in and you can't use
Solaris 7+ or need to run in 32 bits, you can use SFIO from AT&T.

>
> Chris Colburn
> Web Systems Associate
> North Central Regional Educational Laboratory (NCREL)
> e: ccolburn@ncrel.org
>

David S.
davids@bdgp.org



This archive was generated by hypermail 2b28 : Sat Dec 18 1999 - 16:17:34 EST