Downloading ASP.NET files stops all other requests on the website.

We have a web portal that has a page that allows users to upload up to 5 files at a time. There are only 5 standard ASP.NET FileUpload controls per page.

The problem is that we see that when a user uploads files, he stops all other actions on the site. Within 1-2 minutes, when the download is loading, we see that requests begin to queue and require bandwidth to be reduced to zero. As soon as the files finish downloading, everything resumes. (We use New Relic to show us what is happening)

We are not dealing with a frequently used function, and the downloaded files are small. However, we saw that downloading 4 files of 70 kB each causes this.

Some investigation led me to this blog post . Unfortunately, the product they sell requires Server 2008 and IIS7, and the client requires 2003 and IIS6. Also, it just doesn't seem like 4 tiny downloads should have this effect.

So, does anyone else face this situation or know something that could have been done incorrectly to cause this problem on such a small scale? Maybe there are incorrect settings for the application pool or web.config, which we should look at that will throttle bandwidth?

+8
performance file-upload
source share
5 answers

Try using delegates for asynchronous output. This can help.

+1
source share

Why don't you try placing the download controls in the update panel? I think I will handle the download request separately. Let me know if this works.

0
source share

In the case when you say that all other actions on the site stop, it turns out only on clients that perform the download (EDIT: I see that you indicated otherwise in the comment), and if you do not need to write data to the session during the download , the solution will be simple: change the page / handler / WebMethod that accepts the load so that it cannot be written to the session, as follows.

  • For the page, add EnableSessionState="false" or EnableSessionState="ReadOnly" in the @ Page directive.
  • For a generic handler, remove IRequiresSessionState from the class declaration, or replace it with IReadOnlySessionState .
  • For WebMethod, use the EnableSession property of the WebMethod attribute : [System.Web.Services.WebMethod(EnableSession=false)]
0
source share

if you use asp fileupload server control add this code to web.config

 <httpRuntime executionTimeout="110" maxRequestLength="4096" requestLengthDiskThreshold="80" useFullyQualifiedRedirectUrl="false" minFreeThreads="8" minLocalRequestFreeThreads="4" appRequestQueueLimit="5000" enableKernelOutputCache="true" enableVersionHeader="true" requireRootedSaveAsPath="true" enable="true" shutdownTimeout="90" delayNotificationTimeout="5" waitChangeNotification="0" maxWaitChangeNotification="0" enableHeaderChecking="true" sendCacheControlHeader="true" apartmentThreading="false" />` 

just change executionTimeout="110" maxRequestLength="4096"

0
source share

-> 2. General mail handler - Here you can check the size, extension, where to store, etc.

  • After the download is complete, reply to some msg / do messages.

This structure has nothing with your website speed ... its how it loads these files on another page. It's also nice to think that several files are uploaded one after another.

0
source share

All Articles