Apache的FOP 1.0多线程 - 打开的文件太多err24 [英] Apache FOP 1.0 Multithreading - Too many open files err24

查看:189
本文介绍了Apache的FOP 1.0多线程 - 打开的文件太多err24的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们使用Apache FOP来一大堆XML的对法新社和PDF的转换。我们目前的负荷将是一个HP-UX系统上运行的每25K左右的文件。我们已经在该用于初始化并触发在生产者 - 消费者的方式FOP转换总共8个线程。日前有转换过程中多次失败,当抬头一看,我们已经收到了通用FOP错误,如:

We use Apache FOP to convert a whole lot of XML's to AFP's and PDF's. Our current load would be around 25k files per run on a HP-UX system. We have 8 threads in total that are used to initialize and trigger the FOP conversion in a producer-consumer fashion. Recently there have been multiple failures during conversion and when looked up, we've received generic FOP errors like:

**ERROR,2460364,FOToPDF_Thread_11,FOP Exception, something.pdf,Failed to resolve font with embed-url './Fonts/arial.ttf'** 

或它的错误无法加载字体规格文件,虽然文件完整与正确的权限。许多其他的PDF的产生所以这不能成为问题

or its an error failing to load the font metrics file although the files are intact with the right permissions. Many other PDF's are generated so this can't be the problem.

我们还风与

**java.io.FileNotFoundException: /PDF/20130111130002/something.pdf (Too many open files (errno:24))**

通过日志来判断和正在处理的量,这看起来像一个FOP的问题。我读过,FOP已与字体文件过去有这个问题。已经出现了,其中的Apache已经多次打开每个字体文件,而不是关闭导致大量的打开文件的句柄实例。这应该是固定的,但如果它仍然存在,这将是一个很好的,快速的解决了这个,除了张贴本关于Apache列表?

Judging by the logs and volume being processed, this looks like an FOP problem. I've read that FOP has had this issue in the past with the font files. There have been instances where Apache has opened each font file multiple times and not closed the handles resulting in a large number of open files. This was supposed to be fixed, but if it still persists, what would be a good and quick solution to this, apart from posting this on the Apache lists?

能否在HP-UX MAXFILES每个进程打开的文件描述符的限制被超越2048增加了吗?这会帮助吗?任何其他建议?

Can the HP-UX maxfiles limit for the open file descriptors per process be increased beyond 2048? Would that help? Any other suggestions?

推荐答案

在Apache的FOP项目相关的问题是

The relevant issue on the Apache FOP project is

https://issues.apache.org/jira/browse/FOP-2189

由于我评论那里,我无法确定FOP 1.0任何打开的文件句柄。 FontFileReader那获取InputStream参数的构造确实不打烊,但是(谁创造了流)来电正在关闭它,看行94-106

As I commented there, I was not able to identify any open file handle in FOP 1.0. The constructor of FontFileReader that takes an InputStream argument is indeed not closing it, but the caller (who created the stream) is closing it, see lines 94-106 of

<一个href=\"http://svn.apache.org/repos/asf/xmlgraphics/fop/tags/fop-1_0/src/java/org/apache/fop/fonts/truetype/TTFFontLoader.java\" rel=\"nofollow\">http://svn.apache.org/repos/asf/xmlgraphics/fop/tags/fop-1_0/src/java/org/apache/fop/fonts/truetype/TTFFontLoader.java

这篇关于Apache的FOP 1.0多线程 - 打开的文件太多err24的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆