[plt-scheme] CPU-Hogging, memory-eating web server?

From: Eli Barzilay (eli at barzilay.org)
Date: Sun Sep 24 12:38:51 EDT 2006

On Sep 24, Chris Warrington wrote:
> Ittai Balaban @ 2006-9-24 8:50:04 AM
> "[plt-scheme] CPU-Hogging, memory-eating web server?" <mid:1159105805.10348.0.camel at ittai-laptop>
> 
> >> Are you running as root or a regular user?
> > As a regular user.
> 
> I've experienced the same behavior on Windows running as a non-admin.
> Running as an admin works just fine.

I tried the following:

* Run the web server in its default configuration (on a Linux),
  works fine.

* Change the owner of all of default-web-root to be root, restart
  server, get a 100% cpu use.

* Change the owner back to me, except for default-web-root/log,
  restart server, 100% cpu.

So it must be the code in dispatchers/dispatch-log.ss
(gen-log-message) that tries to open the file for writing, catching
the error and looping back infinitely.  It should check for
permissions and barf if it can't write to the log file.  Also, it
should probably try `open-output-file' only a few times and then
report the error it gets -- otherwise we will see the same behavior on
other FS errors.

(BTW, this is a classic maintenance nightmare:
  (with-handlers ([exn? ...]) ...)
catches enough errors so you never see any real problems.  In this
case, all errors are masked out as 100% cpu use.)

-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                  http://www.barzilay.org/                 Maze is Life!


Posted on the users mailing list.