cancel
Showing results for 
Search instead for 
Did you mean: 

Print form timeout for large files

Former Member
0 Kudos

Hello!

I'm new to AIF so please bear with me if this has been discussed before, maybe I'm not looking in the right place!

I'm using WDJ and creating a pdf print form from an application. It's a receipt that shows some basic data on page 1 and a table that overflows to the following pages depending on the number of rows in the table.

I have found out that 500 rows renders quickly but now the customer wants to have up to 20 000 rows in the table and then the pdf engine fails with a PDFObjectRuntimeException message.

From testing I've seen that more that 1000-1500 rows causes the time out, after roughly 60 seconds.

1000 rows would generate ~30 pages with my current layout and a file size of around 1MB.

I've checked SAP note 811342 and 842353.

The first option in 811342 didn't help and debugging is not enabled as suggested in 842353.

Since it works for smaller data sets I'm not sure if option 2 & 3 in 811342 are applicable..?

My questions are these:

Does 1000 rows in a print form seem like alot or should this be perfectly possible?

If so is there a way to increase the time out value or improve the performance so it finishes quicker?


[EXCEPTION]
 com.sap.tc.webdynpro.clientserver.adobe.pdfdocument.base.core.PDFDocumentRuntimeException: PDFDocument Processor failed to process Render Request.
	at com.sap.tc.webdynpro.clientserver.adobe.pdfdocument.base.core.PDFDocumentRuntimeException.<init>(PDFDocumentRuntimeException.java:25)
	at com.sap.tc.webdynpro.clientserver.adobe.pdfdocument.base.core.PDFDocumentProcessor.process(PDFDocumentProcessor.java:55)
	at com.sap.tc.webdynpro.clientserver.adobe.pdfdocument.base.core.PDFDocumentCreationContext.execute(PDFDocumentCreationContext.java:205)
	at com.sap.tc.webdynpro.clientserver.adobe.pdfdocument.base.core.PDFDocumentCreationContext.execute(PDFDocumentCreationContext.java:229)
	at com.sap.tc.webdynpro.clientserver.adobe.pdfdocument.impl.PDFDocumentCreationContextWDImpl.execute(PDFDocumentCreationContextWDImpl.java:94)

<snip>

Caused by: com.sap.tc.webdynpro.pdfobject.core.PDFObjectRuntimeException: Service call exception; nested exception is: 
	java.net.SocketTimeoutException: Read timed out
	at com.sap.tc.webdynpro.pdfobject.core.PDFObject.doSoapCall(PDFObject.java:440)
	at com.sap.tc.webdynpro.pdfobject.core.PDFObject.render(PDFObject.java:3988)
	at com.sap.tc.webdynpro.clientserver.adobe.pdfdocument.base.core.PDFDocumentRenderHandler.handle(PDFDocumentRenderHandler.java:153)
	at com.sap.tc.webdynpro.clientserver.adobe.pdfdocument.base.core.PDFDocumentProcessor.process(PDFDocumentProcessor.java:52)
	... 43 more
Caused by: java.rmi.RemoteException: Service call exception; nested exception is: 
	java.net.SocketTimeoutException: Read timed out
	at com.sap.tc.webdynpro.adsproxy.ConfigBindingStub.rpData(ConfigBindingStub.java:84)
	at com.sap.tc.webdynpro.adsproxy.ConfigBindingStub.rpData(ConfigBindingStub.java:94)
	at com.sap.tc.webdynpro.pdfobject.core.PDFObject.doSoapCall(PDFObject.java:417)
	... 46 more
Caused by: java.net.SocketTimeoutException: Read timed out
	at java.net.SocketInputStream.socketRead0(Native Method)
	at java.net.SocketInputStream.read(SocketInputStream.java:153)
	at java.io.BufferedInputStream.fill(BufferedInputStream.java:200)
	at java.io.BufferedInputStream.read(BufferedInputStream.java:218)
	at com.sap.engine.services.webservices.jaxm.soap.HTTPSocket.readLine(HTTPSocket.java:889)
	at com.sap.engine.services.webservices.jaxm.soap.HTTPSocket.getInputStream(HTTPSocket.java:375)
	at com.sap.engine.services.webservices.jaxm.soap.HTTPSocket.getResponseCode(HTTPSocket.java:284)
	at com.sap.engine.services.webservices.jaxrpc.wsdl2java.soapbinding.HTTPTransport.getResponseCode(HTTPTransport.java:415)
	at com.sap.engine.services.webservices.jaxrpc.wsdl2java.soapbinding.MimeHttpBinding.outputMessage(MimeHttpBinding.java:563)
	at com.sap.engine.services.webservices.jaxrpc.wsdl2java.soapbinding.MimeHttpBinding.call(MimeHttpBinding.java:1444)
	at com.sap.tc.webdynpro.adsproxy.ConfigBindingStub.rpData(ConfigBindingStub.java:77)
	... 48 more

My runtime system is NW 7.0 ehp1 sp5

I'm grateful for any help or hints where I should look!

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

I'm gonna reply to my own thread here

I found the timeout value for the WS client in Visual Admin from another thread.

Its here:

Services -> Web services container -> Settings: "WS Clients socket timeout (seconds)"

It is set to 180 seconds so I did some testing with generated data.


Rows	Time(s)	Pages	PDF size (KB)
0	0	1	15
500	7	16	624
1000	18	31	1200
2000	49	61	2400
3000	95	92	3600
4000	165	122	4800
5000	-

With 180 sec timeout it doesn't crash until 5000 rows so I guess that's ok performance. I will have to convince the customer that more than say 30 seconds is too long to wait and come up with an alternative.

What I don't like is that the time grows exponentially (ie that 4000 rows takes more that twice the time of 2000 rows and so on), this seems to indicate some poor coding in the pdf renderer?

So now I know how to change the timeout value, but my second question was is there any way to improve performance?

Edited by: Richard Linnander on Oct 25, 2010 5:56 PM

Former Member
0 Kudos

Hi,

It sounds to me that you do not need to be using Adobe interactive forms for this scenario.

If you do not need all the bells and whistles that Adobe interactive forms provides maybe just try using iText..

Maybe do a small test with iText generating that number of rows and see if that is a solution.

http://itextpdf.com/

Regards,

Ilan

Former Member
0 Kudos

Thank you for your reply!

Does iText work from web dynpro?

In my scenario the client has processed a lot of data in Web Dynpro Java and then I want to create a receipt of what has been done and show/mail this as a PDF.

Former Member
0 Kudos

Hi,

Yes, I use both iText and AIF from WDJ. (Though I push 99% of logic and processing either to the J2EE or R3)

We have also created a servlet on the J2EE that gets calls from WDJ that generates PDFs using iText.

Former Member
0 Kudos

Follow up

I noticed that all cluster nodes were configured to use the ADS on the central instance. Switching to run the ADS from localhost improved performance a lot!

In the final design I used and excel export library for tables larger than 500 rows.