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

From: Ethan Herdrick (info at reatlas.com)
Date: Wed Apr 25 23:12:36 EDT 2007

Using (define timeout 5)  or (define timeout 1) makes no difference.
(The servlet in question executes in less than a second, so small
values are OK here).  I also changed the "Servlet Connection" timeout
setting (in configure.ss) to 5.  But I'm still seeing the same
behavior.

Also, per the advice of Daniel and Noel, I'm trying the latest nightly
build, 369.10.  Unfortunately, when I try to run any servlet
(including configure.ss) I get this:

Servlet exception:
compound-unit: unit argument expects an untagged import with signature
servlet^, which this usage context does not supply


 === context ===
c:\plt-369.10-full\collects\mzlib\private\unit-runtime.ss:66:4: loop
c:\plt-369.10-full\collects\mzlib\private\unit-runtime.ss:132:2: check-sigs
c:\plt-369.10-full\collects\web-server\dispatchers\dispatch-servlets.ss:312:8
...r/private/servlet.ss:42:21
...r/private/servlet.ss:42:21
select-handler/no-breaks
select-handler/no-breaks
select-handler/no-breaks
dispatcher?
dispatcher?
c:\plt-369.10-full\collects\web-server\private\dispatch-server-unit.ss:67:10:
connection-loop

Maybe it's time for me to go back to Linux...

On 4/25/07, Jay McCarthy <jay.mccarthy at gmail.com> wrote:
> On 4/25/07, Ethan Herdrick <info at reatlas.com> wrote:
> 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.
>
> Serving static files could depend on what your other timeout settings
> are. Because of HTTP/1.1 it doesn't hang up connections until your web
> browser does, but some browser/benchmarks expect the server to hang
> up.
>
> Jay
>
> --
> Jay McCarthy <jay.mccarthy at gmail.com>
> http://jay.teammccarthy.org
>


Posted on the users mailing list.