[plt-scheme] Web server consuming much memory and slowing down with use -- some benchmarks.

From: Jay McCarthy (jay.mccarthy at gmail.com)
Date: Wed Apr 25 12:43:26 EDT 2007

This timeout is cumulative on the timeout in the configuration-table,
so the servlet instance will live for some amount of time.

The other way of changing the behavior is to tell the web-server that
you will never use continuations, so it doesn't create the structure.
This can be done with the undocumented 'v2-transitional

(require (lib "none.ss" "web-server" "managers"))
(define interface-version 'v2-transitional)
(define (instance-expiration-handler failed-request) ...)
(define manager (create-none-manager instance-expiration-handler))


On 4/25/07, Robby Findler <robby at cs.uchicago.edu> wrote:
> On 4/25/07, Jens Axel Søgaard <jensaxel at soegaard.net> wrote:
> > Jay McCarthy skrev:
> >
> > >>   (define timeout +inf.0)
> > >
> > > Because of this line, the web-server will never reclaim memory used by
> > > this servlet. Every request will create a structure used to hold
> > > continuations that it might capture (the server doesn't know it
> > > doesn't actually use them) and then hold on to that structure forever.
> >
> > Is it possible to improve this?
> I wondered a dual question: does setting the timeout to 0 when there
> are no continuations actually change the behavior (aside from plugging
> the leak)?
> Robby

Jay McCarthy <jay.mccarthy at gmail.com>

Posted on the users mailing list.