Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Server Application Unavailable on Upload > 60mb

Status
Not open for further replies.

steverbs

Programmer
Joined
Jul 17, 2003
Messages
253
Location
GB
Hi all.

Whenever I try to upload a file around 60mb or more (I will eventually need to be able to upload up to 200mb), my application just stops and gives me the message "Server Application Unavailable". There are no entries in the event logs and I am at a complete loss as to how to overcome this.

Any help is greatly appreciated.

Regards.

Stephen.
 
faq855-3217

:-)
paul

penny.gif
penny.gif

The answer to getting answered -- faq855-2992
 
Cheers Paul. I'm already overriding the Machine.Config file with...

<httpRuntime maxRequestLength="153600" />

...in the site's Web.Config file. I wouldn't have thought that a limit on the file size would cause a 'Server Application Unavailable' error though, would it?

Regards.

Steve.
 
If you check your Event Viewer for the server, you'll see a corresponding message in there saying that the ASPNET worker thread didn't respond after x number of seconds, and that the service is restarting due to that fact.

Now, I have never had to deal with this problem before, so I don't know the solution, but that is your problem.

You need to search out Google to find out how to increase that timeout, as well. Should probably be a setting in your machine.config if I had to make a guess.

If you search on the exact text of the logged event, you shouldn't have much trouble finding it.

Please post the solution back here when you figure out which setting it is... or better yet, FAQ it if you have time.

:-)
-paul

penny.gif
penny.gif

The answer to getting answered -- faq855-2992
 
Right. I didn't realise it was the Event Viewer that I should be checking, I've been looking in the IIS logs. Found the error now, will let you know the outcome shortly.

Thanks for your help.

Steve.
 
Ok, found the Microsoft solution in the .net documentation under: "tmlInputFile Class". It is due to memoryLimit under <processModel> in Machine.Config needing to be increased. However, this seems like a bad idea, so I would like to know if there is a way to stop the entire uploading file from being cached. Is there, perhaps, a way to upload and store a file bit-by-bit?
 
I don't know of a way. But that certainly doesn't mean that there isn't one.

I have never had the need to allow users to upload a file bigger than just a few MBs. [surprise]

200MBs?!?!

What are your specs? Would an FTP transfer be completely out of the question? You can always setup a secure FTP directory, and give your users access to it. IE even has a pretty nice little "Windowsy" ftp client built right in.


paul

penny.gif
penny.gif

The answer to getting answered -- faq855-2992
 
I don't know how you could incorporate this in your code, but when I had a long process that would time out, I put this code in my loop:

Code:
If (100 Mod loopCount) = 0 Then
   Response.Write("")
end if

you might also need a Response.buffer=false before this code, too. I have it commented out, but I can't remember why I put it there in the first place or why I removed it :-)

I believe that the basic idea is that the ASP thread has a timeout value to prevent the application from bogging down the server if a thread locks up. So you really don't want to extend that timeout value much because it is there as a protection. The better way to handle it is to find some way to keep your thread communicating even during long tasks. In my snippet above, I do the response.write to the server once every 100 times through my loop just so it knows I'm still working and haven't gotten hung up somewhere. I'm not sure how you will accomplish this during a download, but that is what you need to do.

Research the Response.buffer=false. I think that somehow it may be part of your answer, but I'm not exactly sure how.

 
Oops, I didn't read as carefully as I should have. My advice would apply if your error message said that your process was timing out, but I don't know if it will help since it is your memory.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top