Xref: utzoo comp.sys.sequent:899 comp.unix.programmer:1644 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!asuvax!ukma!dftsrv!mimsy!oasys!curt From: curt@oasys.dt.navy.mil (Curt Welch) Newsgroups: comp.sys.sequent,comp.unix.programmer Subject: Re: Sockets: Too many open files on a sequent under dynix Message-ID: <7253@oasys.dt.navy.mil> Date: 23 Apr 91 05:30:37 GMT References: <1991Apr22.154031.6903@supernet.dallas.haus.com> Reply-To: curt@oasys.dt.navy.mil (Curt Welch) Followup-To: comp.sys.sequent Organization: David Taylor Research Center, Bethesda, MD Lines: 29 cluther@supernet.dallas.haus.com (Clay Luther) writes: >I do not usually read this group, so please email replies to me at >cluther@supernet.haus.com *or* cluther@ponder.csci.unt.edu. Thanks. You know, I hate it when people do this. If you care enough to post a message, can't you at least read the news group for the next week? >I have begun to think that the sequent is charging 2 files, one for input and >one for output, for each telnet connection to the program. Is this true? If the code is using pseudo ttys for each connection, then yes, it could use 2 (or maybe even 3) files for each connection. Normal TCP connections (socket(), connect()) to daemons only take one file descriptor per connection. (and only cost 1 unit out of 20). >And if so, are there any work arounds, or will I have to restrict the maximum >number of users my program can handle at one time due to a kernel limitation? I'd say your probably have a bug in your code. Write some debug code to test all the file descriptors from 1 to 20 when you get the too many files error. Do an fstat() on all file descriptors and print out the results. This will tell you how many files you have open and what they are. Once you see this output, you will probably be able to understand what the program is doing. If all else fails, use setdtablesize(2) to get around your problem. Curt Welch