Ok, thanks, so there really should be no difference between a report where all 
the URLs resolve and a report where none of them resolve?

Carl

-----Original Message-----
From: Simon Steiner [mailto:[email protected]] 
Sent: Tuesday, January 07, 2014 11:10 AM
To: [email protected]
Subject: RE: running out of filehandles

Hi,

I was told this can happen when you do many FO to IF without closing jvm, files 
are kept open for IF to output stage. Unless you set that property to avoid it.
File is opened to read to check file type and next stage is to read file, these 
2 steps can be far apart so connection may need to redone.

Thanks

-----Original Message-----
From: Carl Buxbaum [mailto:[email protected]]
Sent: 07 January 2014 15:47
To: [email protected]
Subject: running out of filehandles

Hi all, this is directed toward the developers:

We have a customer who recently encountered an issue when running a FOP 1.0 
report in an environment where none of the images referenced in the report 
existed.  All of the references were URLs to images served by our application 
through a servlet.  Our servlet writes the image bytes to the 
ServletOutputStream.  I verified that I close all resources in a finally block 
(I do not, of course, close the Output Stream). If the file does not exist, I 
return a 404 not found in the response.

When the images do not exist on the server, the platform runs out of file 
handles.  They get this error:

java.net.SocketException: Too many open files

After researching a workaround, I had the customer add this to their Java 
startup

-Dorg.apache.xmlgraphics.image.loader.impl.AbstractImageSessionContext.no-so
urce-reuse=true

This fixed it, but we are unclear on why the customer would see a difference 
between a server where all the images are available, and where the images are 
not available.  In their production environment they never had this problem.  
Is it possible that the URL resource (and/or the
ServletOutputStream) is not being closed when the response is 404 not found?

Thanks,

Carl  Buxbaum
Software Architect
TradeStone Software
17 Rogers St. Suite 2; Gloucester, MA 01930
P: 978-515-5128 F : 978-281-0673
www.tradestonesoftware.com<http://www.tradestonesoftware.com>


DISCLAIMER: 
E-mails and attachments from TradeStone Software, Inc. are confidential.
If you are not the intended recipient, please notify the sender immediately by 
replying to the e-mail, and then delete it without making copies or using it in 
any way. No representation is made that this email or any attachments are free 
of viruses. Virus scanning is recommended and is the responsibility of the 
recipient.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

DISCLAIMER: 
E-mails and attachments from TradeStone Software, Inc. are confidential.
If you are not the intended recipient, please notify the sender immediately by
replying to the e-mail, and then delete it without making copies or using it
in any way. No representation is made that this email or any attachments are
free of viruses. Virus scanning is recommended and is the responsibility of
the recipient.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to