Subject: [netatalk-admins] Re: Problems with "Too many files open" [on Solaris 2.5.1]

From: Tony Silva <[email-masked]>
Date: Wed, 3 Dec 1997 12:21:17 -0500

On Wed, 10 Sep 1997 11:05:44 -0400, kann ([email-masked]) wrote:
>> I am running 1.4b2 on Solaris 2.5.1 and it works mostly well. The
>> problem is that for two of our classes we need to use Netscape 4.0
>> and CodeWarrior 12. The problem is that both of these programs
>> seem to open a lot of files and this does not seem to work under
>> Netatalk and Solaris. It does, however, work under AppleShare IP 5.0.

On Wed, 10 Sep 1997 10:26:47 -0700 (PDT), a sun ([email-masked])
responded:
> up the system-wide max number of open files and see if you still have
> problems. you need to do it system-wide because each afpd session runs
> as a particular user.

Can anyone tell me exactly how to do this under Solaris 2.5.1? Is
there some Solaris header file I need to tweak?  Do I need to rebuild
the kernel, netatalk, or both? I've rebuilt many SunOS4 and Linux
kernels and have done quite a bit of UNIX hacking over the years, but
only started using Solaris2 last week.

BTW, in addition to "too many open files" error messages, I have also
seen error messages such as:

  SimpleText cannot open this document. It may be in use by someone else.

when I try to open a file while 5 other files are already open in
SimpleText.  I can consistently reproduce the error with no other
applications open on my Mac and only a single non-NFS Sun directory
containing around 20 files mounted on my Mac.  I am running netatalk
1.4b2 on a Sparcation20 with Solaris 2.5.1. My Mac is a PowerPC 7100
running MacOS 7.5.1.  Here's my /usr/kernel/drv/ddp.conf file:

  #
  # Netatalk driver's configuration file
  #

  name="ddp" parent="pseudo" instance=0 ndevs=100 nlocalrts=256;

Any clues or suggestions for things to try will be greatly
appreciated.  Please "CC: [email-masked]" on your response since I am
not yet on the netatalk-admins mailing list.

TIA,

-- Tony

Tony Silva                              tel:      (508)766-4121
Bose Corporation                        FAX:      (508)820-9522
The Mountain, M/S 234                   Internet: [email-masked]
Framingham, MA 01701-9168                         [email-masked]

---

From: [email-masked] (Hanno Foest)
Date: Wed, 3 Dec 1997 20:12:22 +0100 (MET)

Hi.

> there some Solaris header file I need to tweak?

>From the Solaris 2 FAQ, http://www.wins.uva.nl/pub/solaris/solaris2.html:

Solaris 2.x supports a virtually unlimited number of open 
filedescriptors [...].

3.43) 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(). 

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. 

HTH.

Hanno