On Mon, 2005-09-05 at 18:50 -0500, Eugene Lazutkin wrote: > Yep. It depends on size. It seems that web server sends the first part of > page up to some limit and stalls for a while. After that it may send the > rest or append "internal_error.html" nonsense. > > Now I have to figure out who is the culprit: Apache, FastCGI server, Django > (e.g., FastCGI portion of it), or some weird interaction of all of them. My > bet is it is not Django, but who knows...
I have had a similar problem with django under fcgi (using the fcgi-wsgi connector from flup). On longer pages, most of the page is sent, then it stalls until mod_fcgi times out listening to the fcgi-server, then sends the rest of the page. I have found a workaround for this, which is to use flup's gzip middleware like so: django-fcgi.py: -------------------------------------------------- #!/usr/bin/python from flup.server.fcgi_fork import WSGIServer #from flup.server.fcgi import WSGIServer from flup.middleware.gzip import GzipMiddleware from django.core.handlers.wsgi import WSGIHandler handler = WSGIHandler() handler = GzipMiddleware(handler) WSGIServer(handler).run() This prevents the stalls, at least for browsers that support gzip encoding! I am not, at this time, sure where the problem lies; whether it is in django's WSGI interface, in flup's fcgi-wsgi adapter, or in Apache's mod_fcgi. -- +----------------------------------------------------------------+ | Jason F. McBrayer [EMAIL PROTECTED] | | "If you wish to make Pythocles wealthy, don't give him more | | money; rather, reduce his desires." -- Epicurus |