Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 33528 invoked from network); 18 May 2008 01:47:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 18 May 2008 01:47:54 -0000 Received: (qmail 87623 invoked by uid 500); 18 May 2008 01:47:43 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 87594 invoked by uid 500); 18 May 2008 01:47:43 -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 87583 invoked by uid 99); 18 May 2008 01:47:42 -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:47:42 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of hishabu@gmail.com designates 209.85.198.242 as permitted sender) Received: from [209.85.198.242] (HELO rv-out-0708.google.com) (209.85.198.242) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 18 May 2008 01:46:54 +0000 Received: by rv-out-0708.google.com with SMTP id c5so646124rvf.24 for ; Sat, 17 May 2008 18:47:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; bh=kHdqbVz1ZlEXkRlnEAbcgQcceCefIVRrqX3m8/7S16k=; b=MbvQL8xsiuVTC6oD+veevQ93vb7xp/SIdEzvUpnB1twIiElclnvsIOuJOlThrowOUs22XWkPPII0mpYuqqgj/4kfnzQLwb/zEOvhvI6NqOjmBf8KLorkSVc9WhohM0Hik1wr0jL7OXCAa6h2bZ9xq0NsdkBO1TdKY9i5ovTB/vg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=aDiUvKqZcEupIp1gTmE/vYKkotWW6yP2fLHUCAw2QETb39TCWP6BAGPAAZuaZi92mYsV02g1uvIXWUV0j8YgKyaqSlj5ot2TwalYM4W/p+ibq/cdVpUNCWdyz5kmQI8aJA+cNVgX3sTziW/p07Jv3VmDFBTfFqM9tSKlX7re4aA= Received: by 10.141.86.14 with SMTP id o14mr2753189rvl.148.1211075229371; Sat, 17 May 2008 18:47:09 -0700 (PDT) Received: by 10.141.76.6 with HTTP; Sat, 17 May 2008 18:47:09 -0700 (PDT) Message-ID: <80e3fa0f0805171847kf0b42c1t1a8b11f98dc235e8@mail.gmail.com> Date: Sat, 17 May 2008 18:47:09 -0700 From: "Shabu Khan" To: "Tomcat Users List" Subject: Re: CGI/HTML In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_11676_4419351.1211075229351" References: <80e3fa0f0805161022g1f893341r668f9a89902a3ca2@mail.gmail.com> <482DC7B1.8070003@christopherschultz.net> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_11676_4419351.1211075229351 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Thanks Bill. Can this be tweaked to a lesser value then? On Sat, May 17, 2008 at 6:21 PM, Bill Barker wrote: > > "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 > > -- Shabu Khan | Mentis Systems Inc | W: (425) 649-1130 | C: (425) 301-1948 | F: (425) 256-2819 http://www.linkedin.com/in/shabukhan ------=_Part_11676_4419351.1211075229351--