[This is all in a recent bknr svn hunchentoot running on opencml and sbcl on a mac 10.6]
1. Logging:
I've been playing with running hunchentoot under heavy loads using easy-acceptor, and running against apache-bench (ab)
I noticed that logging to *error-output* often causes socket failures under heavy load, at least in SLIME. Is there a reason why with-open-file-or-console in log.lisp couldn't use a NIL pathname to simply not log, and pathname=T would log to *error-output*, which is what NIL presently means? Now, there seems to be no way to turn off logging (besides subclassing acceptor).
2. Backlog in listener:
I found that in the start-listening method in acceptor.lisp, there is no BACKLOG set for usocket:socket-listen. I think that others have pointed this out as well. The default apache backlog seems to be 100 to 512 [1,2,3] though the default on a macintosh seems silently limited to 128 [4]. In the usocket routines used by hunchentoot backlog seems to be only 5. This seems two orders of magnitude smaller than what is standard for web servers.
I tried putting in :BACKLOG 50 into the start-listening method in acceptor.lisp and it eliminated most failures of ab. Is there any reason why acceptor objects shouldn't have a new backlog slot default value in them much larger than 5, which should be used in the start-listening method?
The appended patches implement both changes, if these suggestions are judged useful. The backlog is 50. I hope they're done correctly; I'm not experienced in submitting patches.
John
[1] http://groups.google.com/group/modwsgi/browse_thread/thread/b6d66d3fe5a53d2c [2] http://weblog.pigfoot.org/pigfoot/2007/07/05/whats-the-maximum-value-of-back... [3] /usr/include/apache2/mpm_common.h:#define DEFAULT_LISTENBACKLOG 511 [4] http://developer.apple.com/library/mac/#documentation/darwin/reference/manpa...