It sounds like it is a threading problem.
Do you get any messages like: "Failed to read font metrics file ... "
It would appear that two threads could be reading the font metrics file at the same time.
Accessing the file is done through the parser so we don't know what it is actually doing and it depends on the parser.
I think each time it is a new data set in memory so it probably is not that.
On 2002.04.26 08:17 Chris Warr wrote:
Hi, I'm running cocoon 2.1dev under tomcat 4.04b2 with JDK 1.3 and FOP 0.20.3. My cocoon app is generating a PDF using FOP. I use and embed a font in my generated PDF file with the following in my userconfig file:
<font metrics-file="d:/fonts/font_dynamo.xml" kerning="yes" embed-file="d:/fonts/dynamo.pfb"> <font-triplet name="dynamo" style="normal" weight="normal"/> <font-triplet name="dynamo" style="normal" weight="bold"/> </font>
This all works fine and dandy under normal usage, I get the dynamo font embedded in my PDF and all is well. However if I run a load test (20 concurrent processes) on the same app. I get the following error appear in my tomcat log files:
2002-04-26 15:25:20 ERROR (2002-04-26) 15:25.20:375 [fop ] (/cocoon/invoice.pdf) HttpProcessor[80][11]/MessageHandler: unknown font dynamo,normal,normal so defaulted font to any
Not for every hit, but for some. So I'm guessing that there is some sort of problem with resource sharing. That is, could FOP not be thread safe as far as accessing this file? Or if the file is loaded into memory once, could there be multi-threading issues with reading from wherever it is stored in memory?
Anyone got any ideas?
Chris.