Apache keeping php waiting on output flush
| From: | George Whiffen | Date: | Thu, 13 Dec 2001 19:17:01 +0000 |
| Subject: | Apache keeping php waiting on output flush | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-77635@lists.php.net to get a copy of this message | ||
Hi,
Apologies if this is more of an Apache question than a php one, but as it's about the
relationship
between them, I thought it was safe to bring it up here ;)
While investigating a possible performance issue, I discovered that (according to microtime()), my
script runs 5 times faster for a local client i.e. telnet GET from the web host itself. I had
expected that although the local GET would obviously be much faster than anything else overall, the
php execution as reported by microtime() would be similar for any kind of client. I had mistakenly
thought that Apache would handle buffering to the client, leaving php to get on with the rest of its
script.
It seems that when php flushes its output buffer it has to wait for Apache to actually send it to
the browser client before the flush returns.
Any thoughts/observations?
George
For the record the environment is :
php/4.0.1pl2
Linux/2.0.36
Stronghold/2.4.2
Apache/1.3.6