uploading document time elapsed

Srikanth Kumar asked on November 8, 2017 10:35

Hi,

We are storing the uploading files in File system. When we upload a document of size around 140 mb, it got failed with the exception "An error occurred when saving data." When we saw the logs, it is inserting a record to "CMS_AttachmentHistory". I don't know why it is storing to AttachmentHistory table.

When i try to replicate the same in my local Kentico 8.2.4 solution with Azure DB, the same process, the record is inserted in "cms_attachment" not in "CMS_AttachmentHistory". The file save successfully.

Can anyone know why it has happend?

Recent Answers


Rui Wang answered on November 8, 2017 13:28

Do you have workflow enabled in the other environment?

0 votesVote for this answer Mark as a Correct answer

Srikanth Kumar answered on November 9, 2017 05:42

Yes,We have workflows enabled in the environment, but not in the local. I think when we upload a document, Kentico will insert a record into "CMS_Attachment" also. But inserting into this table is successfully done itseems but it is failing at "CMS_AttachmentHistory" table.

0 votesVote for this answer Mark as a Correct answer

Rui Wang answered on November 9, 2017 19:07 (last edited on November 9, 2017 19:08)

Can you try to enable workflow locally and test it times out? Or try to upload the file to a page that doesn't have workflow enabled.

This can help you determine if it's the workflow or Azure. I would lean toward Azure timeout for large file, not because of workflow. There would be some setting in Azure you may want to change to increase the time out.

0 votesVote for this answer Mark as a Correct answer

Srikanth Kumar answered on November 10, 2017 05:37

Thanks for the suggestion Rui. I enabled the workflow in my local. In one scenario i enable workflows for all the page types and try to upload a pdf file (Storing in File System). The upload went quite well but when i save the pdf file it took almost 15 min and came up with error "An error occurred when saving data. Please see event log for more details." In event log it is trying to fetch all records from "CMS_AttachmentHistory" table. But as the data is saved here in binary format, it is not able fetch even 1 record with size over 300 MB.

Then i changed the workflow so that workflow not enabled for "CMS.File" type. Now i upload and save the document without any issue.

I came to conclusion like if a doc is in workflow it is always creating a record in "CMS_AttachmentHistory" table. So i changed the workflow to not enable on "CMS.File" type.

0 votesVote for this answer Mark as a Correct answer

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