[hunchentoot-devel] Can we control the number of worker-threads/per-session?

Robert Synnott rsynnott at gmail.com
Thu Nov 13 14:13:44 UTC 2008


2008/11/13 Stefan Scholl <stesch at no-spoon.de>:
> On 2008-11-13 06:50:51, Hans Hübner wrote:
>> No, Hunchentoot currently provides for no control over the number of
>> threads that it creates.  In multi threaded mode, a new thread is
>> created for each incoming connection.  There may be limits in
>> Lispworks and/or Windows that create the apparent limitation that you
>> observe, but they are not under Hunchentoots control.
>
> As posted here 2005: SBCL can be crashed because of this.
>
> http://common-lisp.net/pipermail/tbnl-devel/2005-August/002577.html
>
>

I deal with this by first only allowing a certain number of requests
to get to the webapp at a time, and second actually throwing away
requests as soon as they come in if they hit a higher number. (This no
longer happens due to a better webapp; at most I generally have about
10 requests on each of three servers). It's not ideal, and a better
solution would probably involve request queueing in a proxy.

Running more than one instance per machine and load balancing across
them can actually work, as well; it doesn't seem to get overwhelmed as
easily.


Rob


More information about the Tbnl-devel mailing list