cgi-fcgi buffering problems?

djulien@apc.net
Sat, 07 Sep 96 05:08:18 GMT

From: djulien@apc.net
To: fastcgi-developers@openmarket.com
Subject: cgi-fcgi buffering problems?
Date: Sat, 07 Sep 96 05:08:18 GMT
Message-Id: <M.090696.220818.92@djulien.apc.net>

I have a CGI program (script, actually) that generates a little over 8K of 
output and writes it all out to stdout at the end of processing the request.  
My HTML viewer receives about 4400 bytes, and then sits and waits for more.  
cgi-fcgi is still running, so it appears that either the rest of the buffer 
didn't get from my CGI program to cgi-fcgi, or else it didn't get from cgi-fcgi 
to httpd properly.  I see that cgi-fcgi uses buffers of 8K, but it looks like 
it has code to flush and make room for more as needed.

I've tried writing the CGI output in chunks as small as 1K (still at the end od 
processing), but the same thing happens.  Sometimes the HTML viewer comes back 
to life, but about half of the HTML is missing - in this case I think cgi-fcgi 
manages to exit okay, signalling to httpd that it is finished, but it still 
lost the end of the byte stream sent to it by the CGI program?

Has anybody else experienced similar problems, or could suggest something to 
look at to help track down the problem?  I'm using NCSA 1.5.2 (with FastCGI 
turned off) and Linux 1.2.1.

Thanks,
Don Julien
djulien@apc.net