I had a download failure problem with a 95MB wmv file. I thought it was my
code
but I could not find anything wrong. So I tested the download by replacing
the 95MB
file with a smaller one (20MB). It worked fine. When I contacted my hosting
company
this is what they told me.
(Data streamed through the Response buffer will be held in memory. We allow
a maximum of 100MB memory usage per site.
The 100MB memory limit is applied to the site's application process. Your
site itself is using about 30-50MB on average. So you add 95.1MB on top of
that and it will go over the 100MB. Once this limit is reached, we restart
the process, thus resulting in the failure of the download.)
So the reason for this post is. I don't understand how the response buffer
works. Why is it that the data in the response buffer is held in memory. In
my code I always clear the buffer when I'm done with it. How are they
figuring that my site is averaging 30-50MB?
I guess I'm just looking for information, so I can do a work around. Any
pointers would be appreciated. 2 1651
Steven Bazeley wrote: I had a download failure problem with a 95MB wmv file. I thought it was my code
but I could not find anything wrong. So I tested the download by replacing the 95MB
file with a smaller one (20MB). It worked fine. When I contacted my hosting company
this is what they told me.
(Data streamed through the Response buffer will be held in memory. We allow a maximum of 100MB memory usage per site.
The 100MB memory limit is applied to the site's application process. Your site itself is using about 30-50MB on average. So you add 95.1MB on top of that and it will go over the 100MB. Once this limit is reached, we restart the process, thus resulting in the failure of the download.) So the reason for this post is. I don't understand how the response buffer works. Why is it that the data in the response buffer is held in memory. In my code I always clear the buffer when I'm done with it. How are they figuring that my site is averaging 30-50MB?
I guess I'm just looking for information, so I can do a work around. Any pointers would be appreciated.
Are you doing a Response.Binary Write? If so, it'll load up the whole
file and then shove it down the pipe, hence your memory issues.
Try buffering/streaming the file... http://www.cnblogs.com/bestcomy/arch.../10/31950.aspx
--
Craig
Microsoft MVP - ASP/ASP.NET
Thanks Craig I found the article helpful, and will try the sample code.
"Craig Deelsnyder" <cdeelsny@NO_SP AM_4_MEyahoo.co m> wrote in message
news:ul******** ******@TK2MSFTN GP05.phx.gbl... Steven Bazeley wrote: I had a download failure problem with a 95MB wmv file. I thought it was
my code
but I could not find anything wrong. So I tested the download by
replacing the 95MB
file with a smaller one (20MB). It worked fine. When I contacted my
hosting company
this is what they told me.
(Data streamed through the Response buffer will be held in memory. We
allow a maximum of 100MB memory usage per site.
The 100MB memory limit is applied to the site's application process.
Your site itself is using about 30-50MB on average. So you add 95.1MB on top
of that and it will go over the 100MB. Once this limit is reached, we
restart the process, thus resulting in the failure of the download.) So the reason for this post is. I don't understand how the response
buffer works. Why is it that the data in the response buffer is held in memory.
In my code I always clear the buffer when I'm done with it. How are they figuring that my site is averaging 30-50MB?
I guess I'm just looking for information, so I can do a work around. Any pointers would be appreciated.
Are you doing a Response.Binary Write? If so, it'll load up the whole file and then shove it down the pipe, hence your memory issues.
Try buffering/streaming the file...
http://www.cnblogs.com/bestcomy/arch.../10/31950.aspx
-- Craig Microsoft MVP - ASP/ASP.NET This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: PJ |
last post by:
When streaming a file attachment to the response stream, should I set
Response.BufferOutput = False
or
Response.Buffer = False
or both?
|
by: Brad |
last post by:
I have a response filter which injects "standard" html into my pages. The
filter works fine when the initial stream is small enough not to
buffer...or....if I have a large unbuffered stream (i.e. I set buffer=false
on a large page). Now the problem: If I turn on buffering on a large
page, the page output (to the browser) is correct a few times (sometines
just once, sometime 2-3 times...on the same page) then I seem to either
lose data...
|
by: Brian Piotrowski |
last post by:
Hi All,
I have an SQL Server 2000 table that contains less than 2000 records. I
would like to select some of these records and group them. The query I
wrote runs fine in SQL Server's Query Analyzer, but when I run it in an ASP
page, I get:
Response object error 'ASP 0251 : 80004005'
|
by: David Union |
last post by:
Hi.
I'm posting this here because I don't know exactly what the best group is.
This is for an aspx page with Visual Basic as the code-behind page.
I am doing very simple code...
in the middle of an http request, i set a filename (with path)
and do a Response.WriteFile(filenamewithpath)
then Response.End().
I have tried Response.Clear() and .Flush() ahead of time.
|
by: Shapiro |
last post by:
I have a scenario where I log a resquest to a database table and update the
request with a corresponding response including the response time. I am using
an HttpModule to do this.
My challenge is how to corelate the response to a corresponding request. I
am looking for a sure proof threadsafe way to corelate a response to a
coresponding request message.
Two things that concerns me:-
| |
by: Jim Rodgers |
last post by:
I have a big asp file that has an error under certain conditions -- totally
repeatable. However, it only fails when I set response.buffer = True at the
top. WHen I set it False in order to debug it, it works every time! I even
set it to True, but did a .Flush just before the error, and the error won't
happen.
It only happens when response.buffer is True and no .response.flush is issued.
The error is a string variable turns-up empty...
|
by: eventuranza |
last post by:
For my application, there users can upload and download files to the a
webserver. Straightforward enough. However, when they upload a PDF
file then try to download it, the file seems to be corrupted. The had
not been a problem before but it seems to have been introduced when I
refactored the writing to the response to a buffered version to prevent
potential OutOfMemoryExceptions (you wouldn't believe the size of some
of these...
|
by: nettleby |
last post by:
The Microsoft site has confused me on this issue:
http://www.microsoft.com/technet/prodtechnol/windows2000serv/reskit/iisbook/c06_redirection.mspx?mfr=true
Says that:
"ASP automatically discards any existing output in the buffer when you
call Response.Redirect "
But then the code example has a Response.Clear in, i.e.
If Err.Number 0 Then
|
by: James Harris |
last post by:
Initial issue: read in an arbitrary-length piece of text.
Perceived issue: handle variable-length data
The code below is a suggestion for implementing a variable length
buffer that could be used to read text or handle arrays of arbitrary
length. I don't have the expertise in C of many folks here so I feel
like I'm offering a small furry animal for sacrifice to a big armour
plated one... but will offer it anyway. Please do suggest...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |