chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-users] http-server dies unexpectedly?


From: Graham Fawcett
Subject: [Chicken-users] http-server dies unexpectedly?
Date: Mon, 28 Mar 2005 11:42:58 -0500

Greetings,

I ran the example "hello, world" http-server from the http egg page,
and hit it with apachebench just to get a sense of general
performance. When running 'ab' with concurrent connections, and a
moderate number of requests, e.g.

    ab -c 2 -n 100 http://localhost:4242/

the http-server fulfills all of the requests with no errors
(ChickenRulesOK!). However, when 'ab' terminates, the server process
exits, with no error message.  This happened whether I ran the example
as a script (csi -script) or compiled via csc, and whether or not
debugging output was requested when starting the server.

I wanted to determine the exit code, so I ran it again (csi -script)
via a system call from a shell script. Strangely, the process didn't
die this time (so, no exit code!), but this time I received a number
of lines of output like the following:

thread thread348 terminated with exception: can not write to socket:
(5 "HTTP/1.1")

Presumably, apachebench closed a connection before the server was
finished writing the response. Thread-death seems acceptable under
these circumstances; unexpected process-death is another matter!

Can anyone reproduce the odd behaviour, or have an idea why it
happened? Why would running it via a system() call 'protect' it from
terminating?

I'm running Version 1, Build 92 - linux-unix-gnu-x86, on Ubuntu Linux
(2.6.10-2-386). In case it's meaningful(!), I did have to run
"libtoolize" over the source in order to get Chicken to build properly
(see bug #18890 at bugs.debian.org); otherwise everything was routine.

Thanks,
-- Graham




reply via email to

[Prev in Thread] Current Thread [Next in Thread]