如何增加 Adob​​e LiveCycle 服务器中的事务超时? 长时间服务调用因超时异常而失败

发布于 2024-07-13 15:54:28 字数 2149 浏览 7 评论 0原文

我们正在使用 Adob​​e LiveCycle ConvertPDF 服务转换大型 PDF 文件。

这对于较小的 PDF 文件效果很好,但当我们尝试转换较大的 PDF 文件(大约 150mb - 不要问)时会失败。

Adobe 将事务超时设置为 14(?) 分钟左右。 当我们的巨大 PDF 的处理时间超过这个时间时,操作将被中止。 我们尝试了多个 PDF,因此这不太可能是由损坏的输入文件引起的。

这是异常产生的输出:

com.adobe.livecycle.convertpdfservice.exception.ConvertPdfException: ALC-DSC-000-000: com.adobe.idp.dsc.DSCException: Internal error.
    at com.adobe.convertpdf.docservice.ConvertPdfServiceImpl.toPS2WithSMT(ConvertPdfServiceImpl.java:117)
    at com.adobe.convertpdf.docservice.ConvertPdfServiceImpl.toPS2(ConvertPdfServiceImpl.java:93)
    [...]
Caused by: ALC-DSC-000-000: com.adobe.idp.dsc.DSCException: Internal error.
    at com.adobe.convertpdf.docservice.ConvertPdfServiceImpl$1.doInTransaction(ConvertPdfServiceImpl.java:110)
    at com.adobe.idp.dsc.transaction.impl.ejb.adapter.EjbTransactionBMTAdapterBean.doRequiresNew(EjbTransactionBMTAdapterBean.java:218)
    [...]
Caused by: com.adobe.livecycle.convertpdfservice.exception.ConvertPdfException: Cannot convert PDF file to PostScript. 
Exception: "Transaction timed out: Couldn't connect to Datamanager Service"
    at com.adobe.convertpdf.ConvertPdfBmcWrapper.convertPdftoPs(ConvertPdfBmcWrapper.java:207)
    at com.adobe.convertpdf.ConvertPdfServer.convertPdftoPs(ConvertPdfServer.java:121)
    at com.adobe.convertpdf.docservice.ConvertPdfServiceImpl.toPS2InTxn(ConvertPdfServiceImpl.java:129)
    [...]

到目前为止 - 似乎合乎逻辑。

但是,我找不到配置事务长度的位置。 我想如果我们将超时时间增加到 30 分钟之类,我们的问题就会消失。 (如果我们有办法在没有任何事务的情况下调用此操作,问题就会消失......)

假设我们只是像这样运行它:

ServiceClientFactory factory = com.adobe.idp.dsc.clientsdk.ServiceClientFactory.createInstance(connectionProps);

ConvertPdfServiceClient convertPDFClient = new com.adobe.livecycle.convertpdfservice.client.ConvertPdfServiceClient(factory);

// ... set-up details skipped ...
com.adobe.idp.Document result_postscript = convertPDFClient.toPS2(inPdf,options);
result_postscript.copyToFile(new File("c:/Adobe/output.ps"))

但是,要么我们没有正确设置 ServiceClientFactory,要么可能没有正确读取 JBoss 配置,我们找不到让交易存活得更久的方法。 (交易的生存时间真的是问题吗?)

We are converting large PDF file using Adobe LiveCycle ConvertPDF service.

This works fine for smaller PDF files, but fails when we attempt to convert a large PDF file (around 150mb - don't ask).

It looks like Adobe sets the a transaction timeout around 14(?) minutes. As processing time for our huge PDF exceeds this time, operation is aborted.
We tried multiple PDFs, so this is not likely to be caused by corrupted input file.

Here's the output that exception produces:

com.adobe.livecycle.convertpdfservice.exception.ConvertPdfException: ALC-DSC-000-000: com.adobe.idp.dsc.DSCException: Internal error.
    at com.adobe.convertpdf.docservice.ConvertPdfServiceImpl.toPS2WithSMT(ConvertPdfServiceImpl.java:117)
    at com.adobe.convertpdf.docservice.ConvertPdfServiceImpl.toPS2(ConvertPdfServiceImpl.java:93)
    [...]
Caused by: ALC-DSC-000-000: com.adobe.idp.dsc.DSCException: Internal error.
    at com.adobe.convertpdf.docservice.ConvertPdfServiceImpl$1.doInTransaction(ConvertPdfServiceImpl.java:110)
    at com.adobe.idp.dsc.transaction.impl.ejb.adapter.EjbTransactionBMTAdapterBean.doRequiresNew(EjbTransactionBMTAdapterBean.java:218)
    [...]
Caused by: com.adobe.livecycle.convertpdfservice.exception.ConvertPdfException: Cannot convert PDF file to PostScript. 
Exception: "Transaction timed out: Couldn't connect to Datamanager Service"
    at com.adobe.convertpdf.ConvertPdfBmcWrapper.convertPdftoPs(ConvertPdfBmcWrapper.java:207)
    at com.adobe.convertpdf.ConvertPdfServer.convertPdftoPs(ConvertPdfServer.java:121)
    at com.adobe.convertpdf.docservice.ConvertPdfServiceImpl.toPS2InTxn(ConvertPdfServiceImpl.java:129)
    [...]

So far - seems logical.

However, I can't find where the transaction length is configured. I guess if we increased the timeout to something like 30 minutes, our problem would go away.
(Also the problem would go away if we had way of invoking this operation without any transactions...)

Let's say we are simply running it like this:

ServiceClientFactory factory = com.adobe.idp.dsc.clientsdk.ServiceClientFactory.createInstance(connectionProps);

ConvertPdfServiceClient convertPDFClient = new com.adobe.livecycle.convertpdfservice.client.ConvertPdfServiceClient(factory);

// ... set-up details skipped ...
com.adobe.idp.Document result_postscript = convertPDFClient.toPS2(inPdf,options);
result_postscript.copyToFile(new File("c:/Adobe/output.ps"))

However, either we are not setting up ServiceClientFactory correctly, or maybe not reading JBoss config properly, we can't find way to make the transaction live longer. (Is the transaction time to live really the issue?)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

给我一枪 2024-07-20 15:54:28

在 LiveCycle 管理控制台中,只需转到
首页> 服务> 应用程序和服务> 服务管理> ConvertPdfService

可以在那里更改服务超时。

当使用包含 39k 页(13 个初始页,每个克隆 3000 次,大小约为 15Mb)的转换 pdf(由 iText 生成)进行测试时,最终输出 PostScript 文件约为 1,25Gb。 整个工作大约花了2个小时。 但它有效,没有问题。

(我想这个答案使得这个问题与编程无关,但是嘿。)

In LiveCycle Administration Console simply go to
Home > Services > Applications and Services > Service Management > ConvertPdfService

The service timeout can be changed there.

When testing with converting pdf (generated by iText) that contains 39k pages (13 initial, each cloned 3000 times, size ~15Mb) -final output PostScript file was ~1,25Gb. Whole work took about 2 hours. But it worked, no problems.

(I guess this answer makes the question not-programming related, but hey.)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文