tracker issue : CF-4075206

select a category, or use search below
(searches all categories and all time range)
Title:

Improper Timeout with CFHTMLTOPDF

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): Mary Jo Sminkey / Mary Jo Sminkey (Mary Jo Sminkey)

Created: 10/16/2015

Components: Document Management

Versions: 11.0

Failure Type:

Found In Build/Fixed In Build: CF11_Final /

Priority/Frequency: Major / Some users will encounter

Locale/System: English / Win All

Vote Count: 2

Listed in the version 2016.0.0.297996 Issues Fixed doc
Related Bugs:
CF-4095069 - Similar to


Problem Description: Recently implemented code to generate PDFs with cfhtmltopdf but we keep getting timeouts with an improperly low timeout, it reports "120 ms" when the timeout should be 120 sec. Based on some testing with tick counts included into the error reports, it does appear that it's timing out very quickly, this does not seem to be just a mistake in the error message given. 

Steps to Reproduce: We're only seeing this currently on one of our two CF11 production servers that I've been able to tell for sure. Currently running update 5 although we should have update 6 installed today. Am going to see if I can replicate by taking each of the servers in our cluster out to be able to test on each individually. But so far I only know this is occurring based on errors coming from users on the site, have not been able to replicate myself. 

Actual Result: Throws a Timeout Error : coldfusion.document.DocumentProcessTimeOutException: The content of this document process takes more than 120 milliseconds to process. at coldfusion.document.webkit.PDFgErrorHandler.handleConversionError(PDFgErrorHandler.java:144) at coldfusion.document.webkit.HttpPDFRequestHandler.requestPDFGeneration(HttpPDFRequestHandler.java:170) at coldfusion.tagext.lang.HtmlToPdfTag.processPDFgRequest(HtmlToPdfTag.java:1331) at coldfusion.tagext.lang.HtmlToPdfTag.handlePDFgConversionRequest(HtmlToPdfTag.java:1466) at coldfusion.tagext.lang.HtmlToPdfTag.convertToPDF(HtmlToPdfTag.java:1413) at coldfusion.tagext.lang.HtmlToPdfTag.doEndTag(HtmlToPdfTag.java:1551) at cfpdftemplate2ecfm1140976037.runPage

Expected Result: Should generate the PDF and not timeout until 120000 ms. 

Any Workarounds: I'll have to increase the request timeout on the page to a really unreasonably high number and see if that works.

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	4075206

External Customer Info:
External Company:  
External Customer Name: Mary Jo Sminkey
External Customer Email:  
External Test Config: My Hardware and Environment details: ColdFusion 11 Upd. 5 on IIS

Attachments:

Comments:

Found this forum report that mentioned the same timeout issue but seemed to be related to a memory issue. https://forums.adobe.com/thread/1941869
Comment by External U.
5531 | October 16, 2015 12:13:25 PM GMT
As reported in that forum message, increasing the request timeout does not seem to resolve the issue. Setting it to 99999 just returned an error message of "coldfusion.document.DocumentProcessTimeOutException: The content of this document process takes more than 99999 milliseconds to process." Tick count between start of the request and the error message was 1271 ms, so this timeout message seems to have little to do with what is occurring.
Comment by External U.
5532 | October 16, 2015 12:47:52 PM GMT
Our best guess is something is causing an error in the underlying Jetty service and CF is interpreting that as a timeout. The error message having the wrong timeout is probably just a red herring and not really related to the actual issue, but the error handling here is obscuring whatever the real problem is. Possibly a race coniditon or something along those lines.
Comment by External U.
5533 | October 16, 2015 03:00:00 PM GMT
This is having large impact on our project.
Vote by External U.
5550 | October 16, 2015 06:08:03 PM GMT
Just FYI - we haven't seen this error since upgrading to Update 6. Not sure if that is just coincidence as we also recently reinstalled Fusion Reactor, so that also might have had some effect on this issue as well. Still would like to see better error messages for whatever was causing us to hit this issue.
Comment by External U.
5534 | October 21, 2015 12:14:39 PM GMT
Hi Mary Jo, I realize this ticket is for cfhtmltopdf, but I've seen this issue before w/ cfdocument. Increasing the request's timeout (via CF Admin or cfsetting) doesn't prevent a cfdocument timeout. In one case the issue was triggered by an image tag that had no src value (<img src="">) - not sure if that issue still exists tho. Thanks!, -Aaron
Comment by External U.
5535 | October 27, 2015 11:28:41 PM GMT
Hi Adobe, I see this ticket is marked "Open/To Test/Fixed". Can you please advise if same issue is being fixed for cfdocument? It also has a fixed timeout that cannot be overridden via CF Admin or cfsetting. Thanks!, -Aaron
Comment by External U.
5536 | November 18, 2015 12:32:12 AM GMT
+1 - Please also fix same issue for cfdocument
Vote by External U.
5551 | November 18, 2015 12:32:26 AM GMT
Also, how is this issue being fixed? Is a timeout attribute being added to cfdocument and cfhtmltopdf? Or will they now respect the request timeout specified in CF Admin and cfsetting? Thanks!, -Aaron
Comment by External U.
5537 | November 18, 2015 12:49:51 AM GMT
Aaron, this bug was not about incorrect timeout value. This issue was happpening because of some unhandled exception in the code which resulted in timeout error. So I don't think it is relevant for the scenario you are talking about.
Comment by Chinoy G.
5538 | November 18, 2015 01:11:04 AM GMT
Hi Chinoy, Thanks very much for the follow-up. Should I file another bug for this? The empty image source throws "The content of this document process takes more than 60000 milliseconds to process." on CF11 Update 5 (build 11,0,05,293506): <cfsetting requesttimeout="70"> <cfdocument format="pdf"><img src="" />hi</cfdocument> As you can see, request timeout was ignored. Also, the empty image source should not cause an issue. Two bugs? Thanks!, -Aaron
Comment by External U.
5539 | November 18, 2015 01:49:13 AM GMT
Also, I pointed JMeter threads at the following. After 1 hour, it throws repeated "DocumentProcessTimeOutException". Only fix is to restart the "Add-on Services". index.cfm ---------------------- cflock(name="mylock", type="exclusive", timeout=60) { cfhtmltopdf(destination=expandPath("./myPDF.pdf"), overwrite=true) {writeOutput("my PDF");} } Thanks!, -Aaron
Comment by External U.
5540 | November 18, 2015 01:53:57 AM GMT
Aaron, I think you can file bug for that and we can have a look into it. As for the second note, which CF version you were trying it on?
Comment by Chinoy G.
5541 | November 18, 2015 02:27:50 AM GMT
Hi Chinoy, Thanks. I've filed CF-4088687 for the <img src=""> cfdocument timeout. Regarding the JMeter cfhtmltopdf timeout requiring "Add-on Services" restart, I've posted full details (including code and log files) here: http://prerelease.adobe.com/r/?3e5a78072a4f4c34bcd6c125bf2f466d Thanks!, -Aaron
Comment by External U.
5542 | November 18, 2015 03:23:07 AM GMT
DocumentProcessTimeOutException you were getting repeatedly was because of this bug only. So that is fixed.
Comment by Chinoy G.
5543 | November 18, 2015 04:33:27 AM GMT
Hi Chinoy, Which were you referring to? 1) the one I discussed here: http://prerelease.adobe.com/r/?3e5a78072a4f4c34bcd6c125bf2f466d -or- 2) the one I filed in #CF-4088687 Thanks!, -Aaron
Comment by External U.
5544 | November 18, 2015 05:52:27 AM GMT
The one in the prerelease forum.
Comment by Chinoy G.
5545 | November 18, 2015 10:12:39 PM GMT
Hi Chinoy, Awesome! Thanks very much! -Aaron
Comment by External U.
5546 | November 18, 2015 10:32:30 PM GMT
This issue is fixed and the fix will be available as part next update of ColdFusion 11.
Comment by Nimit S.
5547 | December 02, 2015 10:56:06 PM GMT
I'm getting this same error. I have request timeout turned off so in the error message it says 0 milliseconds. "The content of this document process takes more than 0 milliseconds to process. This timeout value is obtained from the request timeout set in the ColdFusion Administrator". We find refreshing the page generating the pdf (with cfhtmltopdf) that randomly it will work successfully after a few tries. We also find that restarting the Coldfusion 11 Add-on Services service makes the problem go away for a short time. I'm running CF11 Update 7. So when the last note posted on this bug says it will be part of the next update, I cannot find this bug listed in the release notes for Update 8.
Comment by External U.
5548 | June 08, 2016 03:44:51 PM GMT
Hi Paul, This fix is not available in CF11 as of now. It will be included in Update10. But in case you have an urgent requirement for this, you can always contact cfinstal@adobe.com for an hotfix.
Comment by Chinoy G.
5549 | June 09, 2016 12:49:35 AM GMT