By mv on Jul 17, 2009
Running Open Web Server on MacOS
I tried to run Open Web Server on iMac with Mac OS X 10.5.7 on it.
Already existing ComponentsTo build Open Web Server, first we need to have a few components. I already have /usr/bin/make, JAVA SE(/usr/bin/javac etc.), /usr/bin/ant, C/C+ compiler(/usr/bin/gcc and /usr/bin/g++),/usr/bin/perl, /usr/bin/cvs, /usr/lib/libz.\*, /usr/lib/libsasl2.\*, installed. Double check these component versions as per the table given in http://wikis.sun.com/display/wsFOSS/Checkout+and+Build+Instructions#CheckoutandBuildInstructions-RequiredLibrariesandTools
Install Mercurial, NSS, NSPR, Xerces C++, Xalan C++, PCRE, ICU
sudo port install mercurial nspr nss pcre icu xercesc xalanc
Building and Installing Mozilla LDAP C SDK
Building Open Web Server
As you can see the server starts up on port 8080.
I am using "_xpatomic_locked.h" for now. Their performance needs to be optimized using functions in /usr/include/libkern/OSAtomic.h.
NSPR's PR_GetLibraryFilePathname dumps if called with NULL as first argument on MAC so added a hack of PR_GetLibraryFilePathname("ns-httpd40"..).
Some filenames are ugly like defines___.mk will fix it later.
If you see entries in error log like :
Run Web Server in finest log level ( set <log-level>finest</log-level> in server/xml). And look for messages like
failure : HTTP3360: connection limit (1) exceeded.
PollManager::RequestReservation() keep-alive subsystem full
fine: operating system file descriptor limit is 256Now I changed it to 1024 :
fine: allocating 1 file descriptors to the connection queue, 1 file descriptors to keep-alive connections, and 1 file descriptors to the file cache
fine: 130 connection maximum (1 queued, 128 active, 1 keep-alive)
fine: HTTP3066: HTTP keep-alive subsystem will accomodate up to 1 connections
open files (-n) 256
$ulimit -n 1024
fine: operating system file descriptor limit is 1024
fine: allocating 128 file descriptors to the connection queue, 128 file descriptors to keep-alive connections, and 8 file descriptors to the file cache
fine: 384 connection maximum (128 queued, 128 active, 128 keep-alive)
fine: HTTP3066: HTTP keep-alive subsystem will accomodate up to 128 connections
- Build instructions for Open Web Server