Clients are unable to upload TEXT files larger than 70MB to a SharePoint site Published through Forefront UAG(Unified Access Gateway) via IE

 

 

It’s a very common scenario where we try to Upload Files on a SharePoint Site published through Forefront UAG Server. This Solution is implemented to provide access to the Users who want to access the Site from Extranet. And this requirement of Uploading the Files to the Document Library on the SharePoint Site is also not very uncommon. And I am sure a lot of us would have encountered the issue of not being Upload some files which are bigger in Size.

Now, lets discuss one specific issue here where we were not able to Upload TEXT Files of a Size bigger than 70 MB. I am going to discuss all the details of this issue with you in this Blog. Including how we narrowed it down and what was the solution.

Troubleshooting

You guessed it right, we started with gathering UAG traces from the UAG server while trying to reproduce the issue(Upload a file of around 80 MB).

You can refer the Article below if you want to know more about how to collect and analyze UAG traces:

 

https://blogs.technet.com/b/ben/archive/2010/09/03/uag-tracing-made-simple.aspx 

 

But before we even gather UAG trace lets make sure that we have followed the Article below and we have the Registry key mentioned in that Article in place according to the Maximum File Size we are trying to Upload:

 

https://blogs.technet.com/b/ben/archive/2010/03/25/parsian-gulf.aspx

 

Then we started analyzing the UAG traces which we collected and we Filtered the trace with the Path /_layouts/upload.aspx, as this is the URL which is accessed while trying to Upload a File on SharePoint Site. And this is what I see in the Trace:

Client Sends POST Request of 88534977 Bytes:

0011181 Content-Length: 88534977

As you can see above UAG receives the POST request with the File which is around 88 MB in Size(Content-Length shown above is in Bytes). Once the Request is Received UAG starts Buffering the File in its Memory. That’s why you see below that the UAG Accumulates the whole File first before it could deliver it to the Published SharePoint Server.

NOTE: UAG does this Buffering as part of its Design as it has to Parse the Body of the Requests/Response going through it.

Look at the time when UAG Starts Accumulating the File in its Buffer(it starts at 17:25), in the Screenshot below:

image

 

Then, UAG's Filter Accumulates whole 88534977 Bytes of Data. Pay attention to the Time now, its 17:29, which means UAG has already taken 4 Minutes to Buffer the whole File:

 

 

image

 

 

And then UAG checks the Connection to the SharePoint Server and it throws an Error at that point:

 

image

 

The above Error looks to be a Socket Error. It looks that the Connection to the Backend SharePoint Server has timed out because we took 4 Minutes to Buffer the File. And because of this when we try to WRITE to the SharePoint Server we see the same Error:

 

image

 

 

And then at last it Throws the Error 500 which we also see on the client:

 

image

 

 

After Researching more on the above behavior I came across the Article below:

https://support.microsoft.com/kb/925083 

 

According to this Article the Default Time-Out Time on the IIS server is 120 Seconds which is 2 minutes. We checked on the IIS settings on the SharePoint Server and confirmed that the Time-Out setting was indeed set to Default 2 minutes. So, after joining all these blocks its becoming clear now that because UAG was taking around 5 minutes to Buffer the File and then it was sending it to the SharePoint Server, the Connection was getting Timed Out from the SharePoint’s end.

 

So, we increased the Time-Out in the IIS Settings on the SharePoint Server to 600 Seconds which was 10 minutes. And after that we could successfully Upload the same 88 MB File now. We even tried Uploading a 150 MB File and even that worked fine.

 

Blog Written By

NITIN SINGH

SUPPORT ESCALATION ENGINEER, FOREFRONT EDGE SECURITY, MICROSOFT