Disable buffering in apache 2.0.59 during Reverse Proxy


I have hosted an asp.net website in IIS which is working fine. I am creating a reverse proxy for this site using Apache 2.0.59. Below is my Virtual host configuration

<VirtualHost apacheserver:1234>
ProxyPass / http://webserver:1234/
ProxyPassReverse / http://webserver:1234/
ReplaceFilterDefine multiple CaseIgnore
ReplacePattern multiple "http://webserver:1234/" "http://apacheserver:1234/"
SetOutputFilter multiple

My web page allows users to download files.
Here is the problem I am facing, When ever I download a file, apache buffers the entire file to the memory and once it is loaded in memory it starts the download.

The files that I serve are more than 1 GB, so once the user clicks the download he has to wait for quite a long time (around 4/5 mins) for the download to start. This site is going to be used extensively and so this behaviour is not acceptable.

I read that apache 2.2 has option to flush output. I tried IOBuffer size and request buffer size in apache 2.0.59 but neither helped. Can any one guide me on disabling buffering in apache 2.0

Thanks in advance
LVL 13
Who is Participating?
TechTiger007Connect With a Mentor Author Commented:
Thanks Louis01, I read this before and this is exactly the problem I am facing now. How can I overcome this any ideas?
To flush:
 ... <!-- css, js -->
    <?php flush(); ?>
      ... <!-- content -->
Try (in php.ini under [PHP])
output_buffering = Off

maybe also...
zlib.output_compression = Off
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

TechTiger007Author Commented:

thank you for the reply. But I am using ASP.NET not PHP so this solution will not work for me. My ASP.NET application is flushing the contents and it is working fine. Buffering is happening in apache. How to disable buffering in Apache?

Sorry - did not notice. (Never used ASP.NET on apache though)

The web.config file allows for a "buffer=false" setting. Maybe it's worth a try?
See http://msdn.microsoft.com/en-us/library/950xf363.aspx

You could always try and use the following (top of aspx file)
<%@ Page Buffer="false"%>
TechTiger007Author Commented:

Thanks again. As I mentioned in my original question there is no issue in my ASP.NET site, it is the reverse proxy that is buffering. Please read the question.

Louis01Connect With a Mentor Commented:
Apologies if I frustrate you, but this issue interests me. In trying to understand, I found the following link. Perhaps it helps?
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.