On Tuesday 16 March 2010 21:09:33 Pavel Georgiev wrote:
> for (<some condition>) {
>     $request->print("--$this->{boundary}\n");
>     $request->print("Content-type: text/html; charset=utf-8;\n\n");
>     $request->print("$data\n\n");
>     $request->rflush;
> }
> 
> And the result is endless memory growth in the apache process. Is that what
>  you had in mind?
> 
I can confirm this. I have tried this little handler:

sub {
  my $r=shift;

  until( -e "/tmp/stop" ) {
    $r->print(("x"x70)."\n");
    $r->rflush;
  }

  return Apache2::Const::OK;
}

The httpd process grows slowly but unlimited. Without the rflush() it grows 
slower but still does.

With the rflush() its size increased by 100MB for an output of 220MB.
Without it it grew by 10MB for an output of 2.3GB.

I'd say it's a bug. 

Torsten Förtsch

-- 
Need professional modperl support? Hire me! (http://foertsch.name)

Like fantasy? http://kabatinte.net

Reply via email to