Question
Work Object PDF attachment download is timing out
The PDF attachments could be more than 100MB for a requirement and its taking more than 15 minutes to download using the OOB activity 'DisplayAttachFile' which in turn using the java sendFile() method. Can anyone please suggest a better option? PS : 1) Tried to Obj-Open the attachment table first and then pass the page to sendfile() but keeping a big content on the clipboard is causing further delay. If the attachment string is converted to HTML stream and then using the activity HTMLtoPDF also has performance issues as per the article SA-21145.
If you are on Tomcat, try dropping an example 100Mb PDF file into the 'webapps\ROOT' folder.
Then create a simple HTML file to link to it (say 'test.htm') , something like:
Then browse to the html file: http://host:port/test.htm; and click the download link.
How long does this take to download ?
If this is significantly faster than the your PRPC Activity - this might suggest that the bottleneck is fetching the PDF bytes from the database itself; and then any other processing involved to place that information on a PRPC page etc.
I'm not sure if this would make it faster or not (you would need to try to see if this is the case or not) - You might want to consider you storing these very large Attachments in an external Content Management System (like Al Fresco) or a Cloud-Based storage system - like 'box'.