Bernie at talkcity.com gave me a great tip on working around the
solaris problem with 'too many open files'.  He said that 
adding these "tunables" to /etc/system did the trick:

     set rlim_fd_max=4096
     set rlim_fd_cur=1024

However, I felt a little timid about adding those settings without
first understanding them, so I checked around a bit.  I found 
no mention of them in Sun's AnswerBook.  A search of the web 
got me an exchange in SunWorld Online

  http://suncom.bilkent.edu.tr/sunworldonline/swol-07-1996/swol-07-letters.html

The full text of this exchange is below, but the gist of the message
is that it may be dangerous to use any values greater than

  set rlim_fd_max=1024
  set rlim_fd_cur=256

For the full story, see below.

 - Paul


 ------------------------- copied from sunworldonline ----------------

  Adrian:
  
  The sysadmin before me has placed these two tunables in
  /etc/system. They were there for a Solaris 2.4 system that was being
  used as our main Web gateway.
   
    set rlim_fd_max=4096
    set rlim_fd_cur=1024
  
  We are running under 2.5 on an Ultrasparc/167 and 256 megs of RAM. 
  
  My belief is that I need to get some good documentation on these
  things and that the file descriptors are automatically tuned under a
  2.x system. Right?
  
  --Dru Nelson, Four11 Corp. 
  
  Adrian Cockcroft responds: Those settings are likely to cause
  problems. I'd remove them completely.
  
  www.sun.com and other web servers that I have looked at do not have
  any need to increase the number of file descriptors per process.  This
  is usually only an issue for Sybase databases that have lots of
  users. The default max value is 1024, the "select" system call breaks
  if you set it higher due to FD_SET being hard coded as a 1024 bit wide
  bitfield.
  
  set rlim_fd_max=1024
  
  The current defaults to 64, you can set it up to 256 safely, beyond
  that stdio library calls and SunOS 4 programs running in binary
  compatibility mode will eventually break.
  
  set rlim_fd_cur=256
  
  If a particular command needs more, use a shell script wrapper to
  start the command and put a limit descriptors XXX command in the
  script so it only applies to that process.
  
  You can get "silent" corruption of your program if you set these too
  big, as it writes off the end of fixed size arrays.

---------------------------------------------------------------------------


-- --------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
READ THE FAQ!!!!     <http://java.apache.org/faq/>
Archives and Other:  <http://java.apache.org/main/mail.html/>
Problems?:           [EMAIL PROTECTED]

Reply via email to