Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 28080 invoked from network); 18 May 2008 01:21:16 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 18 May 2008 01:21:16 -0000 Received: (qmail 79669 invoked by uid 500); 18 May 2008 01:21:05 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 79638 invoked by uid 500); 18 May 2008 01:21:05 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 79627 invoked by uid 99); 18 May 2008 01:21:05 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 17 May 2008 18:21:05 -0700 X-ASF-Spam-Status: No, hits=-1.0 required=10.0 tests=RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jak-tomcat-user@m.gmane.org designates 80.91.229.2 as permitted sender) Received: from [80.91.229.2] (HELO ciao.gmane.org) (80.91.229.2) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 18 May 2008 01:20:17 +0000 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1JxXZY-0006HP-9d for users@tomcat.apache.org; Sun, 18 May 2008 01:20:24 +0000 Received: from pool-71-104-91-212.lsanca.dsl-w.verizon.net ([71.104.91.212]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 18 May 2008 01:20:24 +0000 Received: from wbarker by pool-71-104-91-212.lsanca.dsl-w.verizon.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 18 May 2008 01:20:24 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: users@tomcat.apache.org From: "Bill Barker" Subject: Re: CGI/HTML Date: Sat, 17 May 2008 18:21:05 -0700 Lines: 66 Message-ID: References: <80e3fa0f0805161022g1f893341r668f9a89902a3ca2@mail.gmail.com> <482DC7B1.8070003@christopherschultz.net> X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: pool-71-104-91-212.lsanca.dsl-w.verizon.net X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.3138 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 X-RFC2646: Format=Flowed; Response Sender: news X-Virus-Checked: Checked by ClamAV on apache.org "Christopher Schultz" wrote in message news:482DC7B1.8070003@christopherschultz.net... > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Shabu, > > Shabu Khan wrote: > | For some reason, the cgi perl script that I run via IE/Firefox does not > | render the output immediately, but waits until it has big chunk of the > | HTML. Does this have anything to do with the tomcat/cgi setup or > header or > | something, or perl mod defaults? > > This probably has to do with the size of the output buffer in either > Perl or whatever mechanism is being used to shuttle information from > your CGI script through Tomcat and any other layers you may have in > between. > > I would check the CGI runner you are using to see if there is a buffer > size tweaking setting. > > I didn't see anything like that in > http://tomcat.apache.org/tomcat-6.0-doc/cgi-howto.html so you might want > to check the code. > > CGIServlet appears to have a small (2048 byte) buffer for output, which > shouldn't be a problem. It looks like the loop that monitors the > (external) CGI process at 500ms intervals to check up on the process > while no output is being produced. While output is being produced, it > should be constantly moving data from the CGI's stdout to the > ServletOutputStream (which is unbuffered). The /input/ from the CGI is Not strictly true. By default Tomcat has an 8Kb output buffer (in o.a.c.c.OutputBuffer ;) before actually sending the output to the Socket. > buffered up through the end of the headers, and then the writer is > ignored and the input stream is unbuffered (not really sure how this > works properly...). It's possible that you are hitting odd buffer > boundaries where a buffer flush requires several of these half-second > pauses before enough data is available. > > Have you timed your perl script independently to see if there actually > is a delay in generating the content, rather than simply moving if from > the CGI to through Tomcat? > > - -chris > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.9 (MingW32) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > > iEYEARECAAYFAkgtx7EACgkQ9CaO5/Lv0PB4CACggNXDgd1RVziRT+L9KEFr60nC > pVMAnim65WeLxS4QfhfKyeeD207ECWfm > =Pnob > -----END PGP SIGNATURE----- > > --------------------------------------------------------------------- > To start a new topic, e-mail: users@tomcat.apache.org > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org > For additional commands, e-mail: users-help@tomcat.apache.org > > --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org