php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #42379 flush() will eat my server's memory!!
Submitted: 2007-08-22 13:21 UTC Modified: 2007-08-31 01:51 UTC
From: mika at netstock dot net Assigned:
Status: Closed Package: Output Control
PHP Version: 5.2.3 OS: freebsd-6.2
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: mika at netstock dot net
New email:
PHP Version: OS:

 

 [2007-08-22 13:21 UTC] mika at netstock dot net
Description:
------------
when i use flush() or ob_implicit_flush() to push data to browser it will keep eating my server's memory like  4k 4k 4k......and another 4k ..
and my apache is  2.0.59 
Do anyone can help me!!!!

Reproduce code:
---------------
<?
while{1){
echo "$var";
flush();
sleep(1);
}
?>

or

<?
ob_implicit_flush(1);

while{1){
echo "$var";
sleep(1);
}
?>


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-08-23 10:51 UTC] jani@php.net
Only thing I get is this output:
Notice: Undefined variable: var in /opt/www/t.php on line 4

And no leak. How about providing us a bit more information and a script that does not have any errors/notices in it? Your configure line would be nice to know. And what extensions (if any) you load in php.ini..
 [2007-08-23 23:32 UTC] mika at netstock dot net
you probably need excute it for a while (5 min maybe!!)
and  $var maybe need to put some data inside
at client browser, every things looks fine
i didn't get any error but memory leak
it seem call sapi or something .....
 [2007-08-24 10:21 UTC] jani@php.net
How about you first upgrade your apache to something more recent. 
And then you really need to provide the configure line you used to configure PHP. Also: using "register_globals = On" is something you really shouldn't be doing..
 [2007-08-31 01:51 UTC] mika at netstock dot net
i got answer,it is apache bugs!!!
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 20 08:01:30 2024 UTC