Learn how to a build a cloud-first strategyRegister Now


Disable buffering in apache 2.0.59 during Reverse Proxy

Posted on 2008-11-11
Medium Priority
Last Modified: 2012-05-05

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
Question by:TechTiger007
  • 4
  • 3
LVL 11

Expert Comment

ID: 22930029
To flush:
 ... <!-- css, js -->
    <?php flush(); ?>
      ... <!-- content -->
LVL 11

Expert Comment

ID: 22930104
Try (in php.ini under [PHP])
output_buffering = Off

maybe also...
zlib.output_compression = Off
LVL 13

Author Comment

ID: 22937467

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?

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

LVL 11

Expert Comment

ID: 22937514
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"%>
LVL 13

Author Comment

ID: 22938091

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.

LVL 11

Assisted Solution

Louis01 earned 800 total points
ID: 22938245
Apologies if I frustrate you, but this issue interests me. In trying to understand, I found the following link. Perhaps it helps?
LVL 13

Accepted Solution

TechTiger007 earned 0 total points
ID: 22938293
Thanks Louis01, I read this before and this is exactly the problem I am facing now. How can I overcome this any ideas?

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If your site has a few sections that need to be secure when data is transmitted between the server and local computer, such as a /order/ section for ordering or /customer/ which contains customer data, etc it would of course be recommended to secure…
If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses
Course of the Month20 days, 23 hours left to enroll

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question