Re: error : Too many open files

From: Michael Kerrisk (michael-dot-kerrisk-at-gmx-dot-net_at_NOSPAM.COM)
Date: 11/20/03


Date: Thu, 20 Nov 2003 08:24:37 +0100

On Tue, 18 Nov 2003 06:16:07 GMT, Rich Teer <rich.teer@rite-group.com>
wrote:

>On Tue, 18 Nov 2003, psnewsserver wrote:
>
>> I am getting following error while calling shmat() on SOL 2.8
>
>That's Solaris 8, not 2.8.
>
>> perror() of shmat : "Too many open files"
>>
>> I added the following entries in the /etc/system file. It helped for
>> sometime, but after some period of time same problem is seen again.
>
>It looks like your problem is lack of file descriptors, not
>lack of System V IPC resources. Use ulimit to increase the
>maximum number of file descriptors, and you should be OK.

Rather, the problem seems more likely to be this (from shmat(2)):

     EMFILE
           The number of shared memory segments attached to the
           calling process would exceed the system-imposed limit.

As suggested by another poster, the problem is probably an IPC
resource leak. The OP should try looking at the system using ipcs(8)
to see if there are undeleted shared memory segments on the system,
and if so, fix the application.

Cheers,

Michael



Relevant Pages

  • Re: error : Too many open files
    ... >> I am getting following error while calling shmat() on SOL 2.8 ... >lack of System V IPC resources. ... >maximum number of file descriptors, ...
    (comp.unix.solaris)
  • Re: error : Too many open files
    ... >> I am getting following error while calling shmat() on SOL 2.8 ... > maximum number of file descriptors, ... Andrei ...
    (comp.unix.programmer)
  • Re: error : Too many open files
    ... > lack of System V IPC resources. ... > maximum number of file descriptors, ... > HTH, ... If ulimit doesn't do it, ...
    (comp.unix.solaris)
  • Re: error : Too many open files
    ... > lack of System V IPC resources. ... > maximum number of file descriptors, ... > HTH, ... If ulimit doesn't do it, ...
    (comp.unix.programmer)