[Haskell-cafe] SCGI module
Don Stewart
dons at galois.com
Thu Oct 2 18:23:51 EDT 2008
anton.tayanovskyy:
> Hello,
>
> SCGI module from Hackage is not working for me with Apache mod_scgi, I
> think because it uses LazyBytestring to hGetContents on a socket
> handle and the Apache side does not close the socket. Also, looking at
> the source I didn't see any fork* calls, so I assume it is not doing
> concurrency.
>
> So I ended up writing a replacement and would like to invite comments.
> It does forkIO per request and, if asked to, timeouts those threads.
> So far it works for me on simple examples from
> http://www.haskell.org/haskellwiki/Practical_web_programming_in_Haskell
> giving roughly 800 requests a second versus 250 on plain CGI (both
> through Apache).
>
> http://hpaste.org/10842
>
> Thanks!
>
> Also, in general, is there any interest in using SCGI, or FastCGI
> (plain CGI, HappS, you name it) is vastly superior?
Good work.
If you find it useful, upload it to hackage.haskell.org please!
-- Don
More information about the Haskell-Cafe
mailing list