I just fixed a rather insiduous 2.3-only problem in fcgi: Apparently, the 2.3 socket module does not define the SHUT_* constants for the shutdown() syscall. This caused an attribute error that was silently being ignored. The end result was that the FastCGI socket connection with the server was not being closed - this caused output to hang in certain situations.
I didn't see the problem because as I said previously, I run 2.4 everywhere - even on my Macs (which normally come with 2.3 out-of-the-box).
Anyhow, big thanks to Eugene Lazutkin for bringing the problem to my attention, helping to isolate the problem (since it was unreproducible on my end, I had a hard time believing it was fcgi's fault ), and finally, providing access to an environment where it was reproducible 100% of the time (which allowed me to figure it out).
I just came across flup and am hoping to use it to run a Django WSGI application behind Apache using mod_jk2. However, my feeble attempts have simply produced a script that exits without doing anything.
Knowing nothing about WSGI, I'm a little stumped. What could be the issue?
Wow, you must be the one other person who's interested in running WSGI via AJP.
First off, I believe mod_jk2 is deprecated. It hasn't been touched since March of last year.
In theory, setting up django with ajp should be like setting it up with fcgi... But rather than importing fcgi.WSGIServer (or flup.server.fcgi.WSGIServer), you import flup.server.ajp.WSGIServer instead.
And then you configure a worker that points at localhost:8009 and mount the worker at an URI. (Unfortunately, I'm not at all familiar with mod_jk2.)
Anyhow, that's an extremely abbreviated version of "how you do it." I actually run primarily with flup's ajp WSGIServer running behind Apache2/mod_jk.
Allan, is it possible to serve Quixote app using flup.server.scgi on win32 ?
I found that mod_scgi (at long last!) compiled for windows ( http://www.zedshaw.com/projects/scgi_rails/index.html http://www.zedshaw.com/projects/scgi_rails/win32.html ), but scgi_server.py don't want to work in windows
I really can't say anything about win32 compatibility. The best thing to do is to try it out. flup.server.scgi might work, flup.server.scgi_fork will almost definitely not work.
I'd be more than happy to incorporate any win32 fixes (as long as it doesn't interfere with the operation on Unix-like systems). I've been getting a lot of questions about win32 compatibility lately, but I really don't have the resources to do any testing on my own.