File Uploads of 100MB and Larger Usually Fail

classic Classic list List threaded Threaded
15 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

File Uploads of 100MB and Larger Usually Fail

Guest-98

I have no problem in using NeatUpload for say, a 100MB file on the local intranet. But when I deploy my asp.net 2.0 website to the Internet, the same file usually fails to transfer. Does anyone have any suggestions on what to do to make it work better? Small files work reliably.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: File Uploads of 100MB and Larger Usually Fail

Dean Brettle
Administrator
Is the executionTimeout attribute of the <httpRuntime> element set to a large enough value (in seconds) for the upload to complete?  The default is 110 seconds.

--Dean
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: File Uploads of 100MB and Larger Usually Fail

Guest-98
I'll try that. Thanks.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: File Uploads of 100MB and Larger Usually Fail

Guest-98

Dean, I'm still not able to get it work. It does fine on smaller files. However, on larger ones, the pop-up window with the progress bar eventually changes to read...

 

Upload Status:            Error: Thread was being aborted.

 

And the original browser window changes to "This page cannot be displayed...".

 

The app is done in asp.net 2.0/Visual Studio 2005. I have the following value set in my web.config file...

 

<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">

   <system.web>

   <httpRuntime maxRequestLength="2000000" executionTimeout="600"/>

   <httpModules>

      <add name="UploadHttpModule" type="Brettle.Web.NeatUpload.UploadHttpModule, Brettle.Web.NeatUpload"/>

   </httpModules>

etc...

Any ideas?

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: File Uploads of 100MB and Larger Usually Fail

Dean Brettle
Administrator
How long does it take before you get the error message?

FWIW, the error message definitely looks like ASP.NET is killing the thread for some reason (as opposed to NeatUpload failing internally).

--Dean
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: File Uploads of 100MB and Larger Usually Fail

Dean Brettle
Administrator
Are the executionTimeout or maxRequestLength set in the Machine.config?  Also, does switching to "HH:MM:SS" notation for help (e.g. executionTimeout="00:10:00")?

--Dean
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: File Uploads of 100MB and Larger Usually Fail

Guest-98

I think we are experiencing the same sort of error. It does not seem to be so much the filesize but more the 'time spent uploading'.

Sometimes a 100mb file works fine, sometimes a 20 meg file fails to upload.

Our time-outs are high enough. When it crashes, it takes down the entire aspnet_wp.exe process with it. Causing a recycle.

We have put debugging allover the place to try and find out and it dies on a ReadEntityBody call. No error is generated (try... catch doesn't even get triggered.. it just flat out dies).

Is there anything that could cause such a severe crash in the .NET ReadEntityBody call ?

 

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: File Uploads of 100MB and Larger Usually Fail

Dean Brettle
Administrator
I can think of 2 possible causes:

1. Perhaps the NeatUpload UploadHttpModule isn't being used and the request is being stored in memory.  When memory is exhausted the aspnet_wp.exe might crash.  To confirm that the UploadHttpModule is being used, copy NeatUpload's Demo.aspx and Demo.aspx.cs to your app and use them to upload a file.  If you see a progress bar, the UploadHttpModule is being used and this isn't the problem.

2. Perhaps the ASP.NET ISAPI extension is killing the aspnet_wp.exe process because it thinks it is non-responsive.  I think if it does that it normally logs something in the event log.  Is there anything in your event log the corresponds to when the aspnet_wp.exe process is dying?  What (if anything) are the following <processModel> attributes set to in your Machine.config file: pingFrequency, pingTimeout, responseDeadlockInterval, timeout, idleTimeout?

Also, what version of NeatUpload and .NET are you running?  If you aren't running NeatUpload-1.2.5, please try upgrading to that version.  Lastly, how long does it take for the crash to occur?

Thanks,
--Dean
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: File Uploads of 100MB and Larger Usually Fail

Guest-98

Hi Dean,

Thanks for the response.

1. It is using the UploadHttpModule (we have a progressbar - and logging routines inside the module get called).

2. There is indeed something being logged, this is however very cryptic and seemingly random:

"EventType clr20r3, P1 w3wp.exe, P2 6.0.3790.1830, P3 42435be1, P4 name.space, P5 1.0.0.0, P6 44c4a06e, P7 d4, P8 82, P9 system.data.sqlclient.sql, P10 NIL."

The machine.config file contains processModel looking like this:

-         <processModel autoConfig="true"/>

We are running the very latest 1.2.5 but the version we ran before that (1.1.6) also showed this behavior.

Our .NET version is v2.0.50727.

The crashes are as stated.. seemingly random. We can't reliably reproduce it but the site is fairly popular and as such we always have atleast a few crashes a day.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: File Uploads of 100MB and Larger Usually Fail

Guest-98

I forgot to mention in the EventLog error message the 'name.space' is a namespace of our own assembly.

'EventType clr20r3' - Indicates 'death by unhandled exception;

http://blogs.msdn.com/tess/archive/2006/04/27/584927.aspx

The problem is that we *have* a Module that catches any 'unhandled' errors but it simply doesn't get there.

I realise it might be to do with our code but as said before.. logging of the 'live version' always ends somewhere in the NeatUpload component

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: File Uploads of 100MB and Larger Usually Fail

Dean Brettle
Administrator
Thanks for the additional details and especially the link.  I didn't realize an exception thrown in a non ASP.NET thread would cause the server to crash by default.

Since the error message refers to system.data.sqlclient.sql and NeatUpload doesn't do anything DB related I suspect this isn't related to NeatUpload.  To determine that, simply remove the UploadHttpModule from your httpModules section and see if the problem still occurs.  You won't see a progress bar anymore but the application should otherwise work the same.  If you still get the error, the problem is not related to NeatUpload.

You say you have a module that catches unhandled errors, but are you sure that it works like the module described in this article http://support.microsoft.com/?id=911816?  If it just adds an Application.Error handler, that won't catch the kind of error you're seeing.  Instead you need to add a handler to AppDomain.CurrentDomain.UnhandledException?  You might want to test the module by creating an ASP.NET page which starts a new thread that throws an exception.  Does your handler catch that exception?

As for the underlying cause, my best guess (it it is really just a wild guess) is that you might be attempting to use a DB connection which has timed out for some reason.
--Dean
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: File Uploads of 100MB and Larger Usually Fail

Guest-98

Hi Dean,

Thanks for the prompt response.

Yeah, as the article states you can swap that back to the 'old way of things' but that's not exactly a clean option.

We are currently monitoring the system live with the Windows Debugging Tools and hoping for a crash (for once) to occur so that we have debug info to dig into it all.

Our Exception logging module does indeed tap into he AppDomain.CurrentDomain.UnhandledException event - it still does not log anything though, unfortunatly.

Following your logic and further examining everything I believe you are right and the error not lying in the NeatUpload code. I will keep you posted either way and sorry to waste your time !

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: File Uploads of 100MB and Larger Usually Fail

Guest-98

Using the debugging tools and following the following guide ( http://blogs.msdn.com/tess/archive/2006/04/27/584927.aspx ) we found out that the actual crash occurs in a Thread that's being created to log a few things for statistics purposes. The error itself is a Deadlock and that specific download thread is the victim chosen by Sql Server).

Sorry to point the finger at NeatUpload and thanks again :)

 

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: File Uploads of 100MB and Larger Usually Fail

Guest-98
"The error itself is a Deadlock and that specific download thread is the victim chosen by Sql Server"... hmm I dont think I understand.. but ill give it a whack..

Im having the same problem all of a sudden.. so im guessing that.... some other thread totally unrelated to NeatUpload is causing the upload process to crash? Sounds right I guess.. but im on a hosted server.. so im guessing i should "request a dedicated application pool?" because I think my host runs SQL Server and .NET on the same machine.. and im my case its a 20MB file but I was uploading 100MB files earlier without problem..

PS Great product! I cant wait to show you my firefox skin! Worked on it all night
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: File Uploads of 100MB and Larger Usually Fail

panpan2523
In reply to this post by Guest-98
There is a range of Ash shoes to match different kinds of outfits. They are available in various styles so you have no difficulty in choosing the type of shoes that can match your outfit and project the right personality.http://topsheossale.com/ ash store   The clothes that you choose to wear will be complemented well with these shoes and this is the best thing about this brand. You can simply choose from a wide selection of shoes from Ash whether it is for outdoors or party. The shoes from Ash make heads turn your way if you match the shoes with your attire to get a great combination.
Loading...