You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Boaz Shaham <Bo...@purchase.co.il> on 2000/07/10 10:51:13 UTC

Buffering problem when sending data to the client (Apache, Tomcat )

Hi all

We are using Apache 1.3.12 along with tomcat 3.1, currently on Windows NT.
We have some servlets which send data to the clients in relatively small
chunks (in response to an HTTP request), using "flush" after writing each
chunk.
However, it seems that the apache has huge buffers, and the "flush" does not
affect it; thus it sends big chunks once in a while, and in our case the
client waits a long time until it gets all the data in one big chunk.

In the apache FAQs I could find a similar problem, but with scripts ,and it
said that this problem is solved in apache 1.3 for CGI scripts
(http://www.apache.org/docs/misc/FAQ.html#nph-scripts)
However, I could not find anything regarding the problem with java servlets.

Is it a known problem?
Does it have any solution?

Thanks

Boaz

Re: Buffering problem when sending data to the client (Apache, Tomcat )

Posted by Mark Koennecke <Ma...@psi.ch>.


On Mon, 10 Jul 2000, Boaz Shaham wrote:

> Hi all
> 
> We are using Apache 1.3.12 along with tomcat 3.1, currently on Windows NT.
> We have some servlets which send data to the clients in relatively small
> chunks (in response to an HTTP request), using "flush" after writing each
> chunk.
> However, it seems that the apache has huge buffers, and the "flush" does not
> affect it; thus it sends big chunks once in a while, and in our case the
> client waits a long time until it gets all the data in one big chunk.
> 

  I have the same problem but with Apache and JServ. Someone responded
  that the buffering happens in the mod_jserv module of Apache. In fact 
  I found code in jserv_aip11,12.c which opens buffered sockets. In order
  to fix this both knowledge of the Apache API's and a MS - Windows C 
  compiler would be needed (I'am on NT, sorry). Where the latter might
  be the least problem. 

  I probably go for my own buffer and redisplaying a whole page anytime 
  I get new data until the lengthy operation is finished. BTW: I'am
  really annoyed about these differences between servlet engines.  
   

       I hope this helps and does not leave you to frustrated,

                      Mark Koennecke