[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] http/spiffy issues on Windows/MSVC
From: |
Mario Domenech Goulart |
Subject: |
Re: [Chicken-users] http/spiffy issues on Windows/MSVC |
Date: |
02 Jun 2006 15:32:49 -0300 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.4 |
Hello Graham and folks,
On Fri, 12 May 2006 13:22:08 -0400 "Graham Fawcett" <address@hidden> wrote:
> Felix, I'm copying the list on this reply; I'm hoping someone on the
> list can reproduce my results.
>
> On 5/11/06, felix winkelmann <address@hidden> wrote:
> > Did you get spiffy to run properly on Win32? I had
> > strange hangups when accessing large data (i,.e. images)
> > over the web-server. Does this work for you?
>
> Caution: everything I've tested here was on a new machine, with a new
> build of Chicken. It looks solid, but it's not impossible that my
> errors are specific to my build.
>
> Large images appear to work okay; at least I haven't seen any trouble
> yet. But what is definitely not working is keep-alive. The entire
> process is blocking upon the second read on the open connection.
> (Note, this is an http-server problem, not a spiffy problem; I can
> reproduce the same issues without spiffy.)
>
> Here's a fixed version of the last test I sent you (lambda included this
> time!):
>
> (use spiffy)
> (use srfi-18)
>
> (thread-start!
> (make-thread (lambda ()
> (let loop ()
> (thread-sleep! 1)
> (display "beat\n" (current-error-port))
> (loop)))))
>
> (start-server port: 8080 root: "." debug: #f)
>
> The server starts, and begins to print "beat" every second. As soon as
> I visit a URL with my browser, I get a correct response, and the
> connection remains open. But the "beat" stops printing. (If I try to
> open a second browser, that one blocks waiting for a response.) After
> closing the browser -- and closing the connection -- the "beat"
> resumes.
>
> So, either threads are stalled when reading (perhaps you have some
> critical section that's wonky on my MSVC build?), or the process is
> blocking on network input. Or...?
>
> I'm attaching a patch for http-server.scm that includes a new
> parameter, (http:enable-keep-alive), default value #t, that can force
> connections to always close after a response. Also, the patch tests
> does
>
> (when (eq? (build-platform) 'msvc) (http:enable-keep-alive #f))
>
> with a warning message printed to stderr.
>
> It's a shame to loose keep-alive, but it's a working server. If we can
> get to the root of the problem later, removing the msvc test is easy
> to do.
I think I'm facing a similar problem under Linux. I couldn't
reproduce the "beat" behaviour, but spiffy seems to hang quite
frequently for some requests.
When debug: is #t, messages like the one bellow are printed:
[handling GET request...]
[Response: HTTP/1.1 200 OK]
[thread61 (of 1) kept alive, reading next request...]
[read: "GET /prototype.js HTTP/1.1"]
[request: method=GET, url=/prototype.js, protocol=HTTP/1.1]
[attributes: (("cache-control" . "no-cache") ("pragma" . "no-cache") ("referer"
. "http://localhost:8080/guitorra.ws?page=burn") ("connection" . "keep-alive")
("keep-alive" . "300") ("accept-charset" . "ISO-8859-1,utf-8;q=0.7,*;q=0.7")
("accept-encoding" . "gzip,deflate") ("accept-language" . "en-us,en;q=0.5")
("accept" . "*/*") ("user-agent" . "Mozilla/5.0 (X11; U; Linux i686; en-US;
rv:1.7.12) Gecko/20050922 Firefox/1.0.7 (Debian package 1.0.7-1)") ("host" .
"localhost:8080"))]
[handling GET request...]
[Response: HTTP/1.1 200 OK]
[SPIFFY: (root) reading ./prototype.js with size 47445]
[thread61 (of 1) kept alive, reading next request...]
In this example I'm using the ajax egg. It seems that spiffy always
stop at the prototype.js file.
When not using the ajax egg, I notice it stops at a .css file.
[thread65 (of 1) kept alive, reading next request...]
[read: "GET /admrede/layout/layout.css HTTP/1.1"]
[request: method=GET, url=/admrede/layout/layout.css, protocol=HTTP/1.1]
[attributes: (("referer" .
"http://machine:8080/admrede/index.ws?page=projetos.wsi") ("connection" .
"keep-alive") ("keep-a
live" . "300") ("accept-charset" . "ISO-8859-1,utf-8;q=0.7,*;q=0.7")
("accept-encoding" . "gzip,deflate") ("accept-language" . "en-us,
en;q=0.5") ("accept" . "text/css,*/*;q=0.1") ("user-agent" . "Mozilla/5.0 (X11;
U; Linux i686; en-US; rv:1.7.13) Gecko/20060418 Firefo
x/1.0.8 (Ubuntu package 1.0.8)") ("host" . "machine:8080"))]
[handling GET request...]
[Response: HTTP/1.1 200 OK]
[SPIFFY: (root) reading ./admrede/layout/layout.css with size 4488]
[complete-request: http:force-close #f, keep-alive? #t]
[thread65 (of 1) kept alive, reading next request...]
If you have some clue or tip about what can be happening, please, let
me know.
Best wishes,
Mario
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [Chicken-users] http/spiffy issues on Windows/MSVC,
Mario Domenech Goulart <=