Reply to Re: [PHP] php output fills apache buffer for clients with slow internet connections

Your name:

Reply:


Posted by Marek Kilimajer on 04/19/05 12:39

Martin Mandl wrote:
> Dear Ladies and Gentlemen,
>
> the last couple of days I browsed the internet for the answer of a
> questions which seems to be a common problem ... but found now real
> solution:
>
> I would like to serve large files (>100MB) to my clients using php:
>
> while (moreDataAvailable()) {
> printChunk(getChunk());
> flush();
> waitToReduceBandwidth();
> }
>
> Normally that works fine. However when the client has a slower internet
> connection than I set using waitToReduceBandwidth() the output of the
> php script builds up in the buffer of Apache. ... and the Apache process
> reaches a couple of hundred MBytes ...
>
> A solution would be to reduce the bandwidth so that is even lower than
> the slowest connection ... but then clients with faster connections
> would complain ...
>
> Therefore (finally) here come the questions:
> Is there a way to control the output speed of the php script according
> to the actual download speed between the browser and the server?
> Or is there a way to monitor the memory usage of the apache process (to
> slow down the data output when it increases)?
> Or is writing my own socket to act as web server a solution (is it
> possible to monitor the connection speed this way)?
> Or what should I do else?
>
> Any hints are welcome, cheers
> Martin
>

Try apaches' SendBufferSize config directive

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация