Friday July 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.
Install http://svn.macports.org/repository/macports/downloads/MacPorts-1.7.1/MacPorts-1.7.1-10.5-Leopard.dmg as per http://www.macports.org/install.php
sudo port install mercurial nspr nss pcre icu xercesc xalanc
|
As you can see the server starts up on port 8080. |
Note that
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 likefailure : 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
$ulimit -a
open files (-n) 256
...
$ulimit -n 1024
$./https-test/bin/startserv
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
References
This blog copyright 2009 by meena