Errors at high traffic on multiple threads

We are using aspose for converting word to pdf and converting pdf to pdfa. When there is a lot of converting (we are using 8 threads for this actions) sometimes random errors occur when converting. When we try to convert the same document next time it converts without a problem.

This occurs quite often when there is high traffic on our application. And it always works in the second attempt, so we don’t have any examples. We cannot replicate the same problem while debugging.

Do you have any idea why this happens? Is there a way to make Aspose more thread safe? Different way to load?

List of errors (there are more object reference errors in different methods, but those in the list are most common):

  1. Trailer not found
    Marg.General.Infrastructure.LocalizedException: Napaka pri pretvorbi v pdf. Aspose.Pdf.InvalidPdfFileFormatException: Trailer not found
    at #=qCzcPZaSyENsuOiQPcfpk_sRZ$iq4B1KZdsUuk15MCTk=.#=z99Gr5PJ9t$Et_xkA7aOMJuukY1y3(Object #=zlouiXME=)
    at #=qCzcPZaSyENsuOiQPcfpk_sRZ$iq4B1KZdsUuk15MCTk=.#=zXive$6dE8$qpkQk7$$cvC5VgOxT7FjPaDA==(#=qCzcPZaSyENsuOiQPcfpk_sRZ$iq4B1KZdsUuk15MCTk= #=zlouiXME=, #=qUl4z4lghoXgIuNYKDBOmGMrs0FmiGd1AcmIP0iXxHFg= #=zmwn2ob4=)
    at #=qCzcPZaSyENsuOiQPcfpk_sRZ$iq4B1KZdsUuk15MCTk=.#=zXNti_B03MJpUAVr2DbHQ3a3XkgoX()
    at #=qCzcPZaSyENsuOiQPcfpk_sRZ$iq4B1KZdsUuk15MCTk=.#=zGU3m652H4QT0CT0IAb5VIlpJTaW0(Boolean #=zlouiXME=)
    at #=qCzcPZaSyENsuOiQPcfpk_sRZ$iq4B1KZdsUuk15MCTk=.#=z99Gr5PJ9t$Et_xkA7aOMJuukY1y3(Object #=zlouiXME=)
    at #=qCzcPZaSyENsuOiQPcfpk_sRZ$iq4B1KZdsUuk15MCTk=.#=zQqXqIe9Vw72hLwjA$E3ZhpNTJQf0()
    at #=qCzcPZaSyENsuOiQPcfpk_sRZ$iq4B1KZdsUuk15MCTk=.#=zNB0JalbuZGKNgKM6Yq38Q8NnC0xC8zVVozLAT08=(Object #=zlouiXME=, UInt32 #=zmwn2ob4=)
    at #=qCzcPZaSyENsuOiQPcfpk_sRZ$iq4B1KZdsUuk15MCTk=.#=zGU3m652H4QT0CT0IAb5VIlpJTaW0(Boolean #=zlouiXME=)
    at #=qCzcPZaSyENsuOiQPcfpk_sRZ$iq4B1KZdsUuk15MCTk=.#=zGU3m652H4QT0CT0IAb5VIlpJTaW0(Boolean #=zlouiXME=)
    at #=qCzcPZaSyENsuOiQPcfpk_sRZ$iq4B1KZdsUuk15MCTk=.#=zErxp1EFbq0GLNaf5PplAVkD1vnC6hBpTPOU_sYTCA$$i()
    at #=qCzcPZaSyENsuOiQPcfpk_sRZ$iq4B1KZdsUuk15MCTk=.#=zYywa1sACCFKS7HDNQc3i_zgK7O7aNddlcd1NHsaU8rCm(Object[] #=zlouiXME=, Type[] #=zmwn2ob4=, Type[] #=zw$KrfS8=, Object[] #=zaZN7xDI=)
    at #=qCzcPZaSyENsuOiQPcfpk_sRZ$iq4B1KZdsUuk15MCTk=.#=zXARH8KrZbbgjzWv2ebezm_kSJ_XDesIPxgxKu2Vn5nt6(Stream #=zlouiXME=, Int32 #=zmwn2ob4=, Object[] #=zw$KrfS8=, Type[] #=zaZN7xDI=, Type[] #=zeUfjAfI=, Object[] #=zdpA2rWk=)
    at #=qCzcPZaSyENsuOiQPcfpk_sRZ$iq4B1KZdsUuk15MCTk=.#=zDOBBuO62jlERWOdUgPw5f_WAaJuI(Int32 #=zlouiXME=, Type[] #=zmwn2ob4=, Type[] #=zw$KrfS8=, Boolean #=zaZN7xDI=)
    at #=qCzcPZaSyENsuOiQPcfpk_sRZ$iq4B1KZdsUuk15MCTk=.#=zF6mr3c53IsXChf7Hrw==(#=qCzcPZaSyENsuOiQPcfpk_sRZ$iq4B1KZdsUuk15MCTk= #=zlouiXME=, #=qUl4z4lghoXgIuNYKDBOmGMrs0FmiGd1AcmIP0iXxHFg= #=zmwn2ob4=)
    at #=qCzcPZaSyENsuOiQPcfpk_sRZ$iq4B1KZdsUuk15MCTk=.#=zXNti_B03MJpUAVr2DbHQ3a3XkgoX()
    at #=qCzcPZaSyENsuOiQPcfpk_sRZ$iq4B1KZdsUuk15MCTk=.#=zGU3m652H4QT0CT0IAb5VIlpJTaW0(Boolean #=zlouiXME=)
    at #=qCzcPZaSyENsuOiQPcfpk_sRZ$iq4B1KZdsUuk15MCTk=.#=z99Gr5PJ9t$Et_xkA7aOMJuukY1y3(Object #=zlouiXME=)
    at #=qCzcPZaSyENsuOiQPcfpk_sRZ$iq4B1KZdsUuk15MCTk=.#=zQqXqIe9Vw72hLwjA$E3ZhpNTJQf0()
    at #=qCzcPZaSyENsuOiQPcfpk_sRZ$iq4B1KZdsUuk15MCTk=.#=zNB0JalbuZGKNgKM6Yq38Q8NnC0xC8zVVozLAT08=(Object #=zlouiXME=, UInt32 #=zmwn2ob4=)
    at #=qCzcPZaSyENsuOiQPcfpk_sRZ$iq4B1KZdsUuk15MCTk=.#=zGU3m652H4QT0CT0IAb5VIlpJTaW0(Boolean #=zlouiXME=)
    at #=qCzcPZaSyENsuOiQPcfpk_sRZ$iq4B1KZdsUuk15MCTk=.#=zErxp1EFbq0GLNaf5PplAVkD1vnC6hBpTPOU_sYTCA$$i()
    at #=qCzcPZaSyENsuOiQPcfpk_sRZ$iq4B1KZdsUuk15MCTk=.#=zYywa1sACCFKS7HDNQc3i_zgK7O7aNddlcd1NHsaU8rCm(Object[] #=zlouiXME=, Type[] #=zmwn2ob4=, Type[] #=zw$KrfS8=, Object[] #=zaZN7xDI=)
    at #=qCzcPZaSyENsuOiQPcfpk_sRZ$iq4B1KZdsUuk15MCTk=.#=zWwOTABm1mSwSD0cbQTUmNzRRk0tEguqMmskIX2I=(Stream #=zlouiXME=, String #=zmwn2ob4=, Object[] #=zw$KrfS8=, Type[] #=zaZN7xDI=, Type[] #=zeUfjAfI=, Object[] #=zdpA2rWk=)
    at #=qCzcPZaSyENsuOiQPcfpk_sRZ$iq4B1KZdsUuk15MCTk=.#=zAtwhsqPn8_4khiq2ALUCY7c=(Stream #=zlouiXME=, String #=zmwn2ob4=, Object[] #=zw$KrfS8=)
    at #=qCzcPZaSyENsuOiQPcfpk_sRZ$iq4B1KZdsUuk15MCTk=.#=zz_Y$_kTzkL5FLf_HazCcuGdWH$Ym(Stream #=zlouiXME=, String #=zmwn2ob4=, Object[] #=zw$KrfS8=)
    at #=zlHr$ZyT4dgnXKbL91oOCFFbelGk167TY2w==.#=zy7VCGA5LZgmd(StringBuilder #=zC$btUvk=, #=zkJrYNhVG0Lc$8YGa_5NFox9jlpwQWaHB4zRUOT0= #=z3J4shJc=)
    at #=zlHr$ZyT4dgnXKbL91oOCFFbelGk167TY2w==…ctor(Stream #=zuKj_41A=, String #=zJEdyc2g=, Boolean #=zY$zRhmk5h5FY)
    at #=zlHr$ZyT4dgnXKbL91oOCFFbelGk167TY2w==…ctor(Stream #=zuKj_41A=)
    at #=zq20dZvi1qDPKiWqCZZkk7Qk$3IPkKOfuz9rsIUY=.#=znlb49C8=(Stream #=zuKj_41A=)
    at #=zYuTRjC5haReAzPc8N2LDligyJry2sjaP3Q==…ctor(Stream #=zuKj_41A=)
    at #=zq20dZvi1qDPKiWqCZZkk7Qk$3IPkKOfuz9rsIUY=.#=zggoRQvoZ6RLW(Stream #=zuKj_41A=)
    at #=z79EQZgn0wuQjtDVBmhx8jPJ9JMpE.#=zQ7u_FN0=(Stream #=zuKj_41A=)
    at #=z79EQZgn0wuQjtDVBmhx8jPJ9JMpE…ctor(Stream #=zuKj_41A=)
    at Aspose.Pdf.Document.#=zC7zpmC8=(Stream #=z6zh8r40=, String #=zJEdyc2g=)
    at Aspose.Pdf.Document…ctor(Stream input)
    at Marg.AsposeHandler.BL.AsposeWrapper.ConvertToPDF(PDFConvertSource source, PDFConvertOptions options, Boolean& isProtectedFile, UserProfile userProfile, IContainer cnt). GUI error code: Marg.BusinessConnect.Types.InternalUserLogEventEnum.Conversion_ConvertToPdfErrorLog.
    at Marg.AsposeHandler.BL.AsposeWrapper.ConvertToPDF(PDFConvertSource source, PDFConvertOptions options, Boolean& isProtectedFile, UserProfile userProfile, IContainer cnt)
    at Marg.AsposeHandler.BL.AsposeWrapper.ConvertWordToPDF(PDFConvertSource source, PDFConvertOptions options, Boolean& isProtectedFile, Boolean& isPDFA, UserProfile userProfile, IContainer cnt)
    at Marg.BusinessConnect.BL.DocumentStorageImpl.PerformConvertAttachmentToPDF(UserProfile userProfile, DocumentHandle handle, DsDocumentAttachment selectedAttachmentData, String newFileName, ConfidentialityLevel documentConfidentialityLevelId, Boolean throwException, Boolean convertToPdfa, Boolean keepProtectedFiles, Boolean& isProtectedFile, Boolean& isPDFA, String& computerName, String& producer, Boolean inheritParentAttachment, Boolean removeDigitalSignatures, Boolean setTimestampParent)
    at Marg.BusinessConnect.Types.ChangeDocument.Attachment_ConvertToPDF(Int64 attachmentID, Boolean deleteOldAttachment, Boolean throwException, Boolean convertToPdfa, Boolean keepProtectedFiles, Boolean& isProtectedFile, Boolean& isPDFA, String& computerName, String& producer, DsDocumentAttachment& dsAttachmentData, Boolean inheritParentAttachment, Boolean removeDigitalSignatures, Boolean setTimestampParent)
    at Marg.BusinessConnect.Document.CommonDocumentBase.PrepareConvertedAttachmentData(ChangeDocument change, UserProfile userData, IContainer container, DocumentPdfConvertData convertData, CultureInfo cultureInfo, TAttachmentRow attachment)
    Attachment info: (id: 291901) Document.docx

  2. Object reference in Select font (this one occurs most often)
    System.AggregateException: One or more errors occurred. —> System.NullReferenceException: Object reference not set to an instance of an object.
    at #=zJmQouzByTryU9nloqqp9BjucGmmub1pFAeE34vngdg4BrIyysw==.#=zvRP47P4uitvd()
    at Aspose.Pdf.Operators.SelectFont.#=zAT9zjKM=(#=zJmQouzByTryU9nloqqp9BjucGmmub1pFAeE34vngdg4BrIyysw== #=zpZg7Q4Q=)
    at #=zJmQouzByTryU9nloqqp9BjucGmmub1pFAeE34vngdg4BrIyysw==.#=zqNtstmk=(Int32 #=zQOzmJdY=)
    at Aspose.Pdf.Operator.#=zCAzwQu8=(Int32 #=zQOzmJdY=, #=zE3643rodXEt$ngAi7KgUE7Zu3ZjWqd8KI8Is2cgCfXjP #=zpZg7Q4Q=)
    at Aspose.Pdf.OperatorCollection.#=zITeddSbXTS4e()
    at Aspose.Pdf.OperatorCollection.#=zwPBmvWqI_3mG()
    at #=zsaw4KkQscOq7e8L4GhXIZ24DW12dNlzpzYvPjN_G2fT1VTV0dUx1YpU=.#=zCe83RS4=(PageCollection #=z4UK28gE=)
    at #=zsaw4KkQscOq7e8L4GhXIZ24DW12dNlzpzYvPjN_G2fT1VTV0dUx1YpU=.#=zt9dV5x4=()
    at #=zDPbghukI1903OwrwyEAAvDMacqX$UMFcrbXnFWW4ajKJ4aZdWy2kiqo=.#=z3DAh23c=()
    at #=zsaw4KkQscOq7e8L4GhXIZ24DW12dNlzpzYvPjN_G2fT1VTV0dUx1YpU=.#=zlSnUvbI=(XmlTextWriter #=zFTi34cU=, PdfFormat #=zjhHwok8=, Document #=z5s7FhlA=, Boolean #=z4ha0WTQij_vc, ConvertErrorAction #=zoqDs1Hs=)
    at Aspose.Pdf.Document.#=zvbrwmXg=(XmlTextWriter #=zFTi34cU=, PdfFormat #=zjhHwok8=, Boolean #=z4ha0WTQij_vc, ConvertErrorAction #=zoqDs1Hs=)
    at Aspose.Pdf.Document.Convert(Stream outputLogStream, PdfFormat format, ConvertErrorAction action)
    at Marg.AsposeHandler.BL.AsposeWrapper.PrivateConvertPdfToPdfa(UserProfile up, PDFConvertSource source, Document pdfaConvert, IContainer cnt, MemoryStream& outStream)
    at Marg.AsposeHandler.BL.AsposeWrapper.<>c__DisplayClass104_2.b__0()
    at System.Threading.Tasks.Task.Execute()
    — End of inner exception stack trace —
    at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
    at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
    at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout)
    at Marg.AsposeHandler.BL.AsposeWrapper.ConvertWordToPDF(PDFConvertSource source, PDFConvertOptions options, Boolean& isProtectedFile, Boolean& isPDFA, UserProfile userProfile, IContainer cnt)
    at Marg.BusinessConnect.BL.DocumentStorageImpl.PerformConvertAttachmentToPDF(UserProfile userProfile, DocumentHandle handle, DsDocumentAttachment selectedAttachmentData, String newFileName, ConfidentialityLevel documentConfidentialityLevelId, Boolean throwException, Boolean convertToPdfa, Boolean keepProtectedFiles, Boolean& isProtectedFile, Boolean& isPDFA, String& computerName, String& producer, Boolean inheritParentAttachment, Boolean removeDigitalSignatures, Boolean setTimestampParent)
    at Marg.BusinessConnect.Types.ChangeDocument.Attachment_ConvertToPDF(Int64 attachmentID, Boolean deleteOldAttachment, Boolean throwException, Boolean convertToPdfa, Boolean keepProtectedFiles, Boolean& isProtectedFile, Boolean& isPDFA, String& computerName, String& producer, DsDocumentAttachment& dsAttachmentData, Boolean inheritParentAttachment, Boolean removeDigitalSignatures, Boolean setTimestampParent)
    at Marg.BusinessConnect.Document.CommonDocumentBase.PrepareConvertedAttachmentData(ChangeDocument change, UserProfile userData, IContainer container, DocumentPdfConvertData convertData, CultureInfo cultureInfo, TAttachmentRow attachment)
    —> (Inner Exception #0) System.NullReferenceException: Object reference not set to an instance of an object.
    at #=zJmQouzByTryU9nloqqp9BjucGmmub1pFAeE34vngdg4BrIyysw==.#=zvRP47P4uitvd()
    at Aspose.Pdf.Operators.SelectFont.#=zAT9zjKM=(#=zJmQouzByTryU9nloqqp9BjucGmmub1pFAeE34vngdg4BrIyysw== #=zpZg7Q4Q=)
    at #=zJmQouzByTryU9nloqqp9BjucGmmub1pFAeE34vngdg4BrIyysw==.#=zqNtstmk=(Int32 #=zQOzmJdY=)
    at Aspose.Pdf.Operator.#=zCAzwQu8=(Int32 #=zQOzmJdY=, #=zE3643rodXEt$ngAi7KgUE7Zu3ZjWqd8KI8Is2cgCfXjP #=zpZg7Q4Q=)
    at Aspose.Pdf.OperatorCollection.#=zITeddSbXTS4e()
    at Aspose.Pdf.OperatorCollection.#=zwPBmvWqI_3mG()
    at #=zsaw4KkQscOq7e8L4GhXIZ24DW12dNlzpzYvPjN_G2fT1VTV0dUx1YpU=.#=zCe83RS4=(PageCollection #=z4UK28gE=)
    at #=zsaw4KkQscOq7e8L4GhXIZ24DW12dNlzpzYvPjN_G2fT1VTV0dUx1YpU=.#=zt9dV5x4=()
    at #=zDPbghukI1903OwrwyEAAvDMacqX$UMFcrbXnFWW4ajKJ4aZdWy2kiqo=.#=z3DAh23c=()
    at #=zsaw4KkQscOq7e8L4GhXIZ24DW12dNlzpzYvPjN_G2fT1VTV0dUx1YpU=.#=zlSnUvbI=(XmlTextWriter #=zFTi34cU=, PdfFormat #=zjhHwok8=, Document #=z5s7FhlA=, Boolean #=z4ha0WTQij_vc, ConvertErrorAction #=zoqDs1Hs=)
    at Aspose.Pdf.Document.#=zvbrwmXg=(XmlTextWriter #=zFTi34cU=, PdfFormat #=zjhHwok8=, Boolean #=z4ha0WTQij_vc, ConvertErrorAction #=zoqDs1Hs=)
    at Aspose.Pdf.Document.Convert(Stream outputLogStream, PdfFormat format, ConvertErrorAction action)
    at Marg.AsposeHandler.BL.AsposeWrapper.PrivateConvertPdfToPdfa(UserProfile up, PDFConvertSource source, Document pdfaConvert, IContainer cnt, MemoryStream& outStream)
    at Marg.AsposeHandler.BL.AsposeWrapper.<>c__DisplayClass104_2.b__0()
    at System.Threading.Tasks.Task.Execute()<—

  3. Object reference in ConcatenateMatrix
    System.AggregateException: One or more errors occurred. —> System.NullReferenceException: Object reference not set to an instance of an object.
    at Aspose.Pdf.Operators.ConcatenateMatrix.#=zAT9zjKM=(#=zR70vUg8ue0dsqdmt5$8RDb2oMAT1x3pxFG_fo1MnPK9ZMfsQebeEWs7Qal1G #=zpZg7Q4Q=)
    at #=zR70vUg8ue0dsqdmt5$8RDb2oMAT1x3pxFG_fo1MnPK9ZMfsQebeEWs7Qal1G.#=zqNtstmk=(Int32 #=zQOzmJdY=)
    at Aspose.Pdf.Operator.#=zCAzwQu8=(Int32 #=zQOzmJdY=, #=zE3643rodXEt$ngAi7KgUE7Zu3ZjWqd8KI8Is2cgCfXjP #=zpZg7Q4Q=)
    at Aspose.Pdf.OperatorCollection.#=zITeddSbXTS4e()
    at Aspose.Pdf.OperatorCollection.#=zwPBmvWqI_3mG()
    at #=zsaw4KkQscOq7e8L4GhXIZ24DW12dNlzpzYvPjN_G2fT1VTV0dUx1YpU=.#=zCe83RS4=(PageCollection #=z4UK28gE=)
    at #=zsaw4KkQscOq7e8L4GhXIZ24DW12dNlzpzYvPjN_G2fT1VTV0dUx1YpU=.#=zt9dV5x4=()
    at #=zDPbghukI1903OwrwyEAAvDMacqX$UMFcrbXnFWW4ajKJ4aZdWy2kiqo=.#=z3DAh23c=()
    at #=zsaw4KkQscOq7e8L4GhXIZ24DW12dNlzpzYvPjN_G2fT1VTV0dUx1YpU=.#=zlSnUvbI=(XmlTextWriter #=zFTi34cU=, PdfFormat #=zjhHwok8=, Document #=z5s7FhlA=, Boolean #=z4ha0WTQij_vc, ConvertErrorAction #=zoqDs1Hs=)
    at Aspose.Pdf.Document.#=zvbrwmXg=(XmlTextWriter #=zFTi34cU=, PdfFormat #=zjhHwok8=, Boolean #=z4ha0WTQij_vc, ConvertErrorAction #=zoqDs1Hs=)
    at Aspose.Pdf.Document.Convert(Stream outputLogStream, PdfFormat format, ConvertErrorAction action)
    at Marg.AsposeHandler.BL.AsposeWrapper.PrivateConvertPdfToPdfa(UserProfile up, PDFConvertSource source, Document pdfaConvert, IContainer cnt)
    at Marg.AsposeHandler.BL.AsposeWrapper.<>c__DisplayClass105_1.b__0()
    at System.Threading.Tasks.Task1.InnerInvoke() at System.Threading.Tasks.Task.Execute() --- End of inner exception stack trace --- at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken) at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout) at Marg.AsposeHandler.BL.AsposeWrapper.ConvertWordToPDF(PDFConvertSource source, PDFConvertOptions options, Boolean& isProtectedFile, Boolean& isPDFA, UserProfile userProfile, IContainer cnt) at Marg.BusinessConnect.BL.DocumentStorageImpl.PerformConvertAttachmentToPDF(UserProfile userProfile, DocumentHandle handle, DsDocumentAttachment selectedAttachmentData, String newFileName, ConfidentialityLevel documentConfidentialityLevelId, Boolean throwException, Boolean convertToPdfa, Boolean keepProtectedFiles, Boolean& isProtectedFile, Boolean& isPDFA, String& computerName, String& producer, Boolean inheritParentAttachment, Boolean removeDigitalSignatures, Boolean setTimestampParent) at Marg.BusinessConnect.Types.ChangeDocument.Attachment_ConvertToPDF(Int64 attachmentID, Boolean deleteOldAttachment, Boolean throwException, Boolean convertToPdfa, Boolean keepProtectedFiles, Boolean& isProtectedFile, Boolean& isPDFA, String& computerName, String& producer, DsDocumentAttachment& dsAttachmentData, Boolean inheritParentAttachment, Boolean removeDigitalSignatures, Boolean setTimestampParent) at Marg.BusinessConnect.Document.CommonDocumentBase.PrepareConvertedAttachmentData(ChangeDocument change, UserProfile userData, IContainer container, DocumentPdfConvertData convertData, CultureInfo cultureInfo, TAttachmentRow attachment) ---> (Inner Exception #0) System.NullReferenceException: Object reference not set to an instance of an object. at Aspose.Pdf.Operators.ConcatenateMatrix.#=zAT9zjKM=(#=zR70vUg8ue0dsqdmt5$8RDb2oMAT1x3pxFG_fo1MnPK9ZMfsQebeEWs7Qal1G #=zpZg7Q4Q=) at #=zR70vUg8ue0dsqdmt5$8RDb2oMAT1x3pxFG_fo1MnPK9ZMfsQebeEWs7Qal1G.#=zqNtstmk=(Int32 #=zQOzmJdY=) at Aspose.Pdf.Operator.#=zCAzwQu8=(Int32 #=zQOzmJdY=, #=zE3643rodXEt$ngAi7KgUE7Zu3ZjWqd8KI8Is2cgCfXjP #=zpZg7Q4Q=) at Aspose.Pdf.OperatorCollection.#=zITeddSbXTS4e() at Aspose.Pdf.OperatorCollection.#=zwPBmvWqI_3mG() at #=zsaw4KkQscOq7e8L4GhXIZ24DW12dNlzpzYvPjN_G2fT1VTV0dUx1YpU=.#=zCe83RS4=(PageCollection #=z4UK28gE=) at #=zsaw4KkQscOq7e8L4GhXIZ24DW12dNlzpzYvPjN_G2fT1VTV0dUx1YpU=.#=zt9dV5x4=() at #=zDPbghukI1903OwrwyEAAvDMacqX$UMFcrbXnFWW4ajKJ4aZdWy2kiqo=.#=z3DAh23c=() at #=zsaw4KkQscOq7e8L4GhXIZ24DW12dNlzpzYvPjN_G2fT1VTV0dUx1YpU=.#=zlSnUvbI=(XmlTextWriter #=zFTi34cU=, PdfFormat #=zjhHwok8=, Document #=z5s7FhlA=, Boolean #=z4ha0WTQij_vc, ConvertErrorAction #=zoqDs1Hs=) at Aspose.Pdf.Document.#=zvbrwmXg=(XmlTextWriter #=zFTi34cU=, PdfFormat #=zjhHwok8=, Boolean #=z4ha0WTQij_vc, ConvertErrorAction #=zoqDs1Hs=) at Aspose.Pdf.Document.Convert(Stream outputLogStream, PdfFormat format, ConvertErrorAction action) at Marg.AsposeHandler.BL.AsposeWrapper.PrivateConvertPdfToPdfa(UserProfile up, PDFConvertSource source, Document pdfaConvert, IContainer cnt) at Marg.AsposeHandler.BL.AsposeWrapper.<>c__DisplayClass105_1.<ConvertWordToPDF>b__0() at System.Threading.Tasks.Task1.InnerInvoke()
    at System.Threading.Tasks.Task.Execute()<—

@Nejca

It is hard to guess what could be the issue without replicating it in our environment. Since you are using multi-threaded environment, please make sure that one file is accessed by only one thread at a time. You can check and make sure that file is released by thread before performing any other operation on it in another thread specially during high traffic slot.

If issue keeps persisting, please try to create a sample console application that is able to reproduce this scenario and share with us. We will test the scenario in our environment and address it accordingly.

We managed to replicate the problem. Sending the application.

There is word file in Data that we are using for example (we also noticed that is doesn’t matter which example we use, it happens with different files). Method CreateWords() duplicates this file (if we are opening the same file, we have some other problems). After the first run it’s best to comment that method.

Errors don’t occur everytime. In our testing it occured around 70% of the time with 1000 size example. If you increase the count it happens on more runs.

So, run it multiple times if errors don’t occur. Errors are different, but there are mostly similar to errors I sent in first message.

Link to application.

@Nejca

We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): PDFNET-59654

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

Is there any solution without upgrading? We are using single thread right now and clients are complaining that converting is too slow.

@Nejca

We are afraid that we cannot suggest any solution or workaround before complete investigation of the ticket. However, your concerns have been recorded and once ticket investigation is complete, we will share our findings with you. Please be patient and spare us some time.

We are sorry for the inconvenience.