What's the best webserver for CGI scripts?

Posted On // Leave a Comment

I have a CGI (Bash) script which forwards the output of an executable to a web client. However, I have some issues with it. I have tried two approaches to run the script:



python -m CGIHTTPServer &



This is a Python embedded web server which runs CGI scripts. It supports only one connection at a time (that's ok for my requirements).



lighttpd + mod_cgi



The problem in both cases is that my script does not get the terminate (or pipe failed) signal when the client disconnects. The end result with Python is that it gets stuck for awhile after the client disconnects (thus unable to process new client requests). The result with Lighttpd is a memory leak: as soon as the client disconnects Lighttpd starts to buffer the CGI output until it runs out of memory.


This is a low end system thus I am trying to avoid extra overhead (i.e. PHP). Any ideas are welcome.


http://lowendtalk.com/discussions/feed.rss

0 comments:

Post a Comment