Reseting File Descriptors on Solaris 2.5 / Sparc10 / Apache

Reseting File Descriptors on Solaris 2.5 / Sparc10 / Apache

Post by Christopher Dur » Fri, 20 Dec 1996 04:00:00



Hello,

Im trying to find out how to increase my file descriptors on my
Sparc10 running solaris 2.5. My Stronghold server keeps getting
knocked offline because of these errors:

[Thu Dec 19 09:11:16 1996] Unable to make socket: Too many open files
[Thu Dec 19 09:11:21 1996] access to
/home/owan/htsdocs/patients/owan.cgi failed
 for 207.146.85.108, reason: couldn't spawn child process

Can anyone give me a point in the right direction?

Thanks! Chris

 
 
 

Reseting File Descriptors on Solaris 2.5 / Sparc10 / Apache

Post by Paul David Fo » Sat, 21 Dec 1996 04:00:00



> Hello,

> Im trying to find out how to increase my file descriptors on my
> Sparc10 running solaris 2.5. My Stronghold server keeps getting
> knocked offline because of these errors:

> [Thu Dec 19 09:11:16 1996] Unable to make socket: Too many open files
> [Thu Dec 19 09:11:21 1996] access to
> /home/owan/htsdocs/patients/owan.cgi failed
>  for 207.146.85.108, reason: couldn't spawn child process

> Can anyone give me a point in the right direction?

> Thanks! Chris

There is a serious bug in SunOS 4.x and Solaris 2.x which can
cause programs to behave very erratically if the number of open
files exceeds X (where X >= 128 under SunOS 4.x, and X >= 256  under
Solaris 2.x).

The reason is that in <stdio.h>, the file descriptor is stored
in a (char) (SunOS 4.x)  or (unsigned char) (Sol 2.x). This *s
up any program which attempts to do something like:

        sd1 = socket(..);
        sd2 = socket(..);
        ...
        sd300 = socket(...);

        FILE *fp = fopen("...", "..");

or any other libc call which as a side effect calls fopen (some of the
getXbyY functions come to mind).

The trick to getting round this problem is something like:

        create_socket()
        { int sd, new_sd;
                sd = socket(...);

                /* Move socket out of harms way */
                new_sd = fcntl(sd, F_DUPFD, 257);
                close(sd);
                return sd;
        }

The above will only work, of course, if you have increased the fildes
limit of course.

This is a glaring deficiency in SunOS/Solaris but due to historic
binary compatibilty we have to live with it.

It would be so nice if in LP64/Solaris 2.6 they changed that stupid
256 limit to 32 bits. The oldest piece of Unix is making us work
hard for a living.

_______________________________________________________
| Paul David Fox          Lehman Brothers.             |


| ######################  Tel: +44 171 601 0011 x6397  |
** I do not speak for Lehmans. Everything I say is my own stupid fault.
**

 
 
 

Reseting File Descriptors on Solaris 2.5 / Sparc10 / Apache

Post by Steve K » Tue, 24 Dec 1996 04:00:00





> > Hello,
> > Im trying to find out how to increase my file descriptors on my
> > Sparc10 running solaris 2.5. My Stronghold server keeps getting
> > knocked offline because of these errors:

> There is a serious bug in SunOS 4.x and Solaris 2.x which can
> cause programs to behave very erratically if the number of open
> files exceeds X (where X >= 128 under SunOS 4.x, and X >= 256  under
> Solaris 2.x).

[snip]

On the other hand, just add an entry in /etc/system to increase the
max file descriptors.  Dunno what the name is, but it's in the AnswerBook.

--
Steve Kay

 
 
 

1. Sparc10 solaris 2.5 to Sparc20 solaris 2.6 migration question

subject says it all. I got into this game late. I have a customer running a
Sparc10 with Solaris 2.5 (patch levels woefully behind) who decided the
performance of the Oracle 7x database on it would be increased by moving it
over to a Sparc20 running dual SM71s and Solaris 2.6. They bought all the
H/W then engaged me to do the work. Yikes.

Anyway, my question is: can anyone suggest the audit I might make of the
sparc10 to ensure I can replicate user accounts, host name, etc.. on the new
Sparc20 so i can snapshot the database, copy it over, then go testing? I
realize this is a wide-open question, but I'm not a Solaris guru. My *nix
experience is mostly with SCO and HP-UX...

Any help GREATLY appreciated and email replies preferred as I don't get to
to USENET as much as I'd like...

Jack

_______________
Jack M. Estes, II
Prinicple Consultant
E-SWAT/STS Technologies, Inc.
(314)961-2862 office

2. Free Solaris on Intel

3. Setting system maximum file descriptor (Solaris 2.5)

4. libneXtaw...

5. Running out of File Descriptors (Solaris 2.5)

6. Redhat 7.3 missing some functionality...

7. Xsun grows until crash: Sparc10 (MP), Solaris 2.5, ZX, CDE 1.0.1

8. Retry based aio read - filesystem read changes

9. how to increase file descriptor on 2.5

10. Apache file descriptor limit on Solaris 2.6

11. Solaris/Apache : file descriptors?

12. FS: Solaris 2.5 Desktop (CDE) and/or Solaris 2.5 Server Packages for x86 desktops

13. resetting soft limit on file descriptors