cfdocument type="pdf" Timeout

Community Beginner ,
Dec 28, 2015 Dec 28, 2015

Copy link to clipboard

Copied

Where do I even start...

Scenario: I am the senior architect of multiple corporate .Net solutions.  Recently I decided to introduce ColdFusion11 to serve as a job server for background tasks (Scheduled ETL, Email Provider, Ad Hoc PDF generation and whatever other tasks we may wish to offload in a separate thread.) While I must admit, I stopped doing ColdFusion development some years ago; however, this does not negate the fact that I was an early adopter of ColdFusion and have well over 10 years of seasoned "in the trenches" experience with the language from the Alliare days, through the Macromedia days and into the Adobe days. Truth is - I have been a huge advocate of ColdFusion and implemented it many large corporations. Having said that -- I figured implementing a ColdFusion stack would be a cinch given my background. Unfortunately, this is not the case. I must say that some of the features I hoped to use (PDF & Web Services) are proving to be a big headache for me and I can't help but wonder if this is a wasted investment. I have to be honest - I am pretty disappointed in CF11.

Lets address the first issue. What is the problem with the cfdocument tag when writing PDF. I keep running into an issue where my CF pages timeout when writing PDF files. After doing some googling I find out this is an issue many are having and nobody really seems like they have a clue as to the root cause and Adobe is mute on the issue.  Before you ask me to post my code - please understand I timeout with <cfdocument ....>Hello World</cfdocument>. This is not a problem with my code (works fine locally w/Dev Edition - production is where it falls on it's face) - all I have done are basic query outputs with a single record in a query object and no images, no styles --- just basic HTML and cfoutput stuff. Restarting the coldfusion service seems to be the only fix. This is unacceptable.  I have since disabled the PDF Service Manager - it would not verify anyway (ColdFusion Service Features) -- perhaps this will prove to stabilize the issue. In any case - can someone on the Adobe CF Team explain to me why this problem is pervasive and what I can do to fix it, work around it and not just hope my job server doesn't have a random nervous breakdown.

Thank you for your time and effort

TOPICS
Documentation, Reporting

Views

4.0K

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct Answer

Adobe Community Professional , Dec 29, 2015 Dec 29, 2015
SemperVI, sorry to hear of your challenges. I have several thoughts to try to help. (Sorry it can’t be written in tweet-length. Obviously, if the problems were easy to solve you would have done so, with your considerable experience. I spend my days, as an independent consultant, helping people solve various CF troubleshooting problems. Mostly I do work on a consulting basis, but I do also try to help out here in the forums and other mailing lists when I can.)So I find it curious that you observe...

Likes

Translate

Translate
Community Beginner ,
Dec 29, 2015 Dec 29, 2015

Copy link to clipboard

Copied

Just a follow up - It seems I was able to stabilize cfdocument features from locking up with the work-around mentioned above. To do this I had to disable the ColdFusion 11 Add-on Services from starting. Unfortunately this also disabled Solr services. In my research I learned these services basically only work in windows environments w/Web-kit (except in my case -- I never could get PDF Services to verify. Locally it failed and in production it just spun the browser up for 45 minutes without a resolution in site. I imagine this is was the culprit of the cfdocument timeout) In any case - I think it is safe to say PDF Service is not yet ready for a G.P. release and the decision to release it was made in poor judgment.

It is a shame ColdFusion DevOps and support is not what it once used to be.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Dec 29, 2015 Dec 29, 2015

Copy link to clipboard

Copied

SemperVI, sorry to hear of your challenges. I have several thoughts to try to help. (Sorry it can’t be written in tweet-length. Obviously, if the problems were easy to solve you would have done so, with your considerable experience. I spend my days, as an independent consultant, helping people solve various CF troubleshooting problems. Mostly I do work on a consulting basis, but I do also try to help out here in the forums and other mailing lists when I can.)

So I find it curious that you observe a connection between CFDOCUMENT and that PDF service. To be clear, as for that add-on service, while as you note is used for Solr also, the “PDF” aspect of it is NOT used by CFDOCUMENT. It’s used by the new CFHTMLTOPDF tag (which offers improved HTML to PDF processing, but does require you to use that tag instead of CFDOCUMENT to get that.)

So I’d be curious about a couple of things, if you may be interested in digging further.

First, I wonder if any of the CF logs would have any info on things when you experience this hangup. Again, with your considerable CF experience you may have already tried to find something there, but you don’t mention it either way. And you may well have learned (in your experience) that the logs “don’t show much of anything useful”. I’ll say that things have changed in CF11 (and 10). Take a look especially at the ColdFusion-out and ColdFusion-error logs, which were not in the CF logs folder before CF10.

Second, since you think there IS a connection with that service, I would wonder if you may find any port blocking issue. See the CF Admin page for “PDF Service”, where it shows what PDF Service Managers (if any) you have configured, and what port they are listening on. There is also a “verify” button next to each. What happens when you use that?

BTW, you mention that you “learned these services basically only work in windows environments”. Are you saying you are or are not on Windows? It may be helpful. But more important, note that whatever you learned from is reporting dated info. This feature is supported on CF11. See http://blogs.coldfusion.com/post.cfm/adobe-coldfusion-11-support-for-cfhtmltopdf-pdfg-on-linux.

Third, you mention that a request spins in the browser. There is more we can do, by monitoring things from the server end, to know if this is tying up only one request thread, or all of CF. (Or do you know already?) There are various means to help with that, including the new “metrics logging” feature in CF10+, or the CF Server Monitor (in CF Enterprise/Trial/Dev editions since CF8), or third party tools like FusionReactor or SeeFusion.

With those monitoring tools, you could get a “stack trace” while the request was running, to see exactly what (if anything) it may be waiting for.

Fourth, I’d note that the documentation forum may not be the best place to either report this issue or seek help for it. I’d have proposed the CF Admin forum, for instance (https://forums.adobe.com/community/coldfusion/coldfusion_administration/), if not the general CF forum. Either way, note that Adobe does not purport to offer support here in the forums. They sometimes chime in, but mostly its users helping users.

They offer paid support, of course, and for those who find they can’t help, or prefer not to try, there are others (myself included) who offer CF troubleshooting services (remote, fast). I keep a list of such folks at cf411.com/cfconsult.

But we can continue to dig in here in the forums as long as it may make sense. Totally your call.

Finally, as for whether this bad experience (or others you may read about) is an indication that either going to CF11 has been a “wasted investment”, or whether certain features are “not ready for a G. P. release”, well, I understand your frustration. I’ll just say that many times when people have such problems, and conclude that CF is broken or sucks or that Adobe doesn’t care, we do ultimately generally find a solution and they often come to a different conclusion. Again, that will be totally your call.

In the meantime, I’m just trying to help.

/charlie


/Charlie (server troubleshooter, carehart.org)

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Dec 29, 2015 Dec 29, 2015

Copy link to clipboard

Copied

Thanks Charlie for your thoughtful response... Much of what I stated was indeed in frustration. I am familiar with CFHTMLTOPDF in name only and it was not clear to me if PDF Service was in anyway associated with CFDOCUMENT -- but I do appreciate the clarification. It seems I have not found a work-around after all. I will continue to keep my fingers crossed that it does not hang again.

As for your other question - yes - I am running in Win64 environments. As for port blocking -- I will look into this and examine the coldfusion out log in more detail.

Lastly, I don't think CF sucks -- far from it. I have 20 plus years in this industry and am accomplished in C# and Java to name a couple. Truth is - I still think ColdFusion is by far the most elegant web-tier run time out there which is why oddly enough I introduced it to a .Net shop and guess what - the .Net guys are beginning to realize it's power - particularly how it is being used as a background job server that replaces the existing .Net open source HangFire solution we were using. At first they could not understand how CF could possibly work for them (What do you mean it's Java? We're .NET!) but they get it now and have embraced it.  I will get through this hick-up as well as a few others I have encountered as it pertains to .Net / ColdFusion interop but I'm making good productive progress. CF will become very pivotal in some up and coming .Net projects and I am looking forward to the challenges it presents. I am just glad I got the opportunity to use both in the same environment to prove it can be done. Having said that - many things have changed in CF and I imagine you will see me posting more in the future.

In the meantime -- I appreciate your response. Thank you

Sean

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Dec 29, 2015 Dec 29, 2015

Copy link to clipboard

Copied

Sure, I understand the frustration. And glad if I may help you get to resolution.

As for the “CF sucks” comment, to be clear, I didn’t say you said that. I said that while “many times when people have such problems, and conclude that CF is broken or sucks or that Adobe doesn’t care, we do ultimately generally find a solution and they often come to a different conclusion”.

As for your hopes to use more CF/.NET interop, just know again that “it’s there” but you’ll find many who have struggled with it, for whatever reason. There are some ready solutions (perhaps configuration issue), and some challenges that may be harder to workaround (such as translations of objects from the .NET to the CF world, where CF may handle some things, like a .net dataset to a cfquery result, and vice-versa better than other things). And you may find far fewer people who are walking that same path. For that topic, you may want to post instead to the “advanced techniques” forum, https://forums.adobe.com/community/coldfusion/coldfusion_advanced.

Wishing you well in your new adventures into CF11 (and renewed adventures into CF in general).

/charlie


/Charlie (server troubleshooter, carehart.org)

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Dec 29, 2015 Dec 29, 2015

Copy link to clipboard

Copied

"As for the “CF sucks” comment, to be clear".... No no -- I completely know what you meant. You did not think you said that.... But let's be honest - I sort of implied it in my frustration and this was not my intent.... I really didn't mean to come across that way. Tight deadlines, out of scope requirements, etc.... it's all good. Gaps are filling in.


As for CF/.NET interop - I am actually having good success with it. Few issues here and there with object state but I have no problem calling my API's and parsing the objects. There is just not a lot of information on the subject but I have discovered a few cool things. Perhaps I will share some things I have learned if people are interested

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Dec 30, 2015 Dec 30, 2015

Copy link to clipboard

Copied

Cool on that, and yep, for sure, as you learn things about CF/.net interop, it would be worth sharing. As you say, there is relatively little that was written.

But do be sure to have taken note of the pretty substantial chapter on the topic in the CFML Developer’s Guide, which many miss, finding only the CFML Reference:

http://help.adobe.com/en_US/ColdFusion/10.0/Developing/WSc3ff6d0ea77859461172e0811cbec22c24-715e.html

And note that I have pointed you to the CF10 version of the docs, rather than CF11, intentionally. Sadly, the CF11 docs have a navigation problem. Consider the same page in the CF11 docs:

https://helpx.adobe.com/coldfusion/developing-applications/using-web-elements-and-external-objects/using-microsoft-net-assemblies.html

It would leave one thinking there was no further documentation, because it doesn’t show the subsections, or offer any means to go from page to page. I and others have raised this to Adobe, but no solution for now.

All that said, his “documentation” forum would be a fine place to share observations related to missing, incomplete, or incorrect info as presented in the docs.

If you don’t have a blog where you might share other info, I’ll say that I’d be happy to offer up a blog post on my site, carehart.org/blog, whether written by you as a “guest post” or by me based on info you may share.

As always, just trying to help. Until again.

/charlie


/Charlie (server troubleshooter, carehart.org)

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Dec 30, 2015 Dec 30, 2015

Copy link to clipboard

Copied

LATEST

Thanks again for the information.

I don't have a blog; however, I am releasing an open source project soon - perhaps I will put a blog on there. In the meantime - I might take you up on your offer about using your site to post some info. I will PM you my contact info - I can send you something basic and see if you get any feedback from it - maybe consuming coldfusion web services from .Net or something. It's was a little awkward at first but simple enough once I figured it out.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines