# Notes About Solaris

These are the installation and user notes for the CERN HTTP Server, the Library of Common Code and the Line Mode Browser. Any comments and suggestions are welcome at libwww@w3.org.

The following hints are from Simon E Spero, <ses@tipper.oit.unc.edu>

- Solaris has problems accepting lots of simultaneous connections. You can alleviate the problem somewhat by increasing the size of the maximum connection queue by using the following command:

      	# ndd -set /dev/tcp tcp_conn_req_max 32

- Another problem that Solaris has is with the period of time it leaves closed connections in the TIME_WAIT state; Solaris uses the reccommended value of 4 minutes; this can result in thousands of tcbs hanging around tieing up memory. Unless you're regularly serving files to sites out beyond lunar orbit, dropping this value to about 30 seconds (as it was in 4.1.3) should be safe. If you do have people sending HTTP requests from that area, then somebody at NASA has way too much spare time on their hands. To change this paramter to a more sensible setting, use the following command.

      	# ndd -set /dev/tcp tcp_close_wait_interval 30000

  This will also help ftp, gopher and any other one-shot protocols.

### Mac and PC socket problem

When a Mac or a PC opens a connection with the http daemon, then dies, the connection hangs up. If your http daemon is running stand-alone, you can stop the loop:

- edit the file /usr/local/bin/httpd_clean:

      #! /bin/csh
      #
      # author: Arthur Secret (webmaster@w3.org)
      #
      set boum4 = `ps -ef | grep 'httpd ' | grep nobody | awk '{print $2}'`
      echo '#! /bin/csh' > /tmp/httpd_clean.tmp
      echo "kill $boum4" >> /tmp/httpd_clean.tmp
      echo ' ' >> /tmp/httpd_clean.tmp
      chmod +x /tmp/httpd_clean.tmp
      sleep 190
      /tmp/httpd_clean.tmp
      rm /tmp/httpd_clean.tmp

- Let's say your http daemon runs as nobody. As we need to create a crontab file for nobody, you must edit the file /etc/cron.d/cron.allow and add the line

      nobody

- Then, as root, type

      crontab -e nobody

  and insert the line

      0,10,20,30,40,50 * * * * /usr/local/bin/httpd_clean > /dev/null 2>&1

By modifying the first line of /usr/local/bin/httpd_clean, you may use this to clean other daemons as well.