We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Words SaveAs method concurrency issue under heavy load

Hi,


We have a batch document generation, which generates several word documents based on a template, sets ~20 bookmark texts on each and then converts each of those into a pdf.

This all works when the amount of documents to generate is low, say 1-5. But now the need has risen to support lots more, 40-50 is quite normal. When this batch is run we run into a peculiar, and severe error. Most of the operations succeed correctly, but some of the SaveAs operations seem to create the new pdf file with a wrong name. And what’s most disturbing is that the wrong names are the names of the previous, unaffiliated files, that get overwritten. The actual error then presents itself when the files are downloaded and we get a 404 not found error on the file that gets saved with the wrong name.

As an attachment you find a trace from Fiddler showing the concurrent SaveAs operations, of which two first are correct, but the third returns the wrong filename.

Concurrency issue in your server code, perhaps? Hoping to see a quick solution, as this endangers the content of the documents generated, and may leak wrong information to third parties on top of the actual error situations it generates.

In the log file pay close attention to:
  • Request 3 request and response:
    • The request specifies that the file should be saved with a filename of "a4dhzda0_2017-03-21T16-30-09.pdf"
    • Responses DestDocument.Href = “igwo8p6g_2017-03-21T16-30-08.pdf” instead of the expected “a4dhzda0_2017-03-21T16-30-09.pdf”. The actual response also coincides with that of Request 2 response
  • Request 5 response
    • The file “a4dhzda0_2017-03-21T16-30-09.pdf” is not found, meaning it actually was written as “igwo8p6g_2017-03-21T16-30-08.pdf” and the original “igwo8p6g_2017-03-21T16-30-08.pdf” replaced
If you need any help from my part, I’m very eager to help out. This needs to be resolved quickly. If you like, I can even do a code review for you, as debugging concurrency issues is quite familiar to me.

Hello Tuukka,

We have been able to reproduce your issue.

We have logged this bug in our issue tracking system as WORDSCLOUD-167. Our Product team is in the process of fixing it. We will keep you updated on the status of this issue.

We apologize for any inconvenience this may have caused.

Best regards

Mateen Sajjad

Aspose - File Format APIs

Keep in touch! We’re on Twitter and Facebook

The issues you have found earlier (filed as WORDSCLOUD-167) have been fixed in this Aspose.Words for Cloud 17.4 update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.