tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shabu Khan" <hish...@gmail.com>
Subject Re: CGI/HTML
Date Sun, 18 May 2008 01:47:09 GMT
Thanks Bill.
Can this be tweaked to a lesser value then?

On Sat, May 17, 2008 at 6:21 PM, Bill Barker <wbarker@wilshire.com> wrote:

>
> "Christopher Schultz" <chris@christopherschultz.net> 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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message