File upload cancels with timeout for large files

Roland Kirpal asked on March 16, 2016 10:35


When I upload large files (more than 200 MB) as a file page in the Kentico page tree, the upload cancels after a while with a timeout error.

This is the error message I get:



INSERT INTO CMS_Attachment ([AttachmentName], [AttachmentExtension], [AttachmentSize], [AttachmentMimeType], [AttachmentBinary], [AttachmentImageWidth], [AttachmentImageHeight], [AttachmentDocumentID], [AttachmentGUID], [AttachmentLastHistoryID], [AttachmentSiteID], [AttachmentLastModified], [AttachmentIsUnsorted], [AttachmentOrder], [AttachmentGroupGUID], [AttachmentFormGUID], [AttachmentHash], [AttachmentTitle], [AttachmentDescription], [AttachmentCustomData], [AttachmentSearchContent]) VALUES (@AttachmentName, @AttachmentExtension, @AttachmentSize, @AttachmentMimeType, @AttachmentBinary, @AttachmentImageWidth, @AttachmentImageHeight, @AttachmentDocumentID, @AttachmentGUID, @AttachmentLastHistoryID, @AttachmentSiteID, @AttachmentLastModified, @AttachmentIsUnsorted, @AttachmentOrder, @AttachmentGroupGUID, @AttachmentFormGUID, @AttachmentHash, @AttachmentTitle, @AttachmentDescription, @AttachmentCustomData, @AttachmentSearchContent); SELECT SCOPE_IDENTITY() AS [ID]

Caused exception: 

Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.

My problem is like this:

I did as the article mentioned. I also read this article:,-authentication-cookies-and-advice-of-delivery

I changed my web.config to the following settings:

<httpRuntime executionTimeout="60000" maxRequestLength="2097151"/>

and also added

      <requestLimits maxAllowedContentLength="2147483648"/>

Nevertheless, I still get timeouts when uploading files. Are any more settings in the web.config that could lead to this timeout? I'm no expert with web.config.

Any help is appreciated.

Thank you, Roland

Correct Answer

Dawid Jachnik answered on March 16, 2016 13:24


i think with you have everything correct, the error you show means that timeout is on the database not on server level. Do you have good connection between application server and database ?

Maybe try increase the database timeout in connection string,

5 votesVote for this answer Unmark Correct answer

Recent Answers

Roland Kirpal answered on March 16, 2016 15:18 (last edited on March 16, 2016 15:18)

Hello Dawid,

Thank you for your valuable advice!

After increasing all timeouts it seems that increasing the connection string timeout did the trick.

Again thanks alot for your help! :)


0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.