Professional Web Applications Themes

cfdoent hangs - Coldfusion - Advanced Techniques

We have been generating pdfs for several weeks with no problem. All of the sudden earlier today, the browser started to hang whenever we get to a cfdoent tag. Sometimes it works, sometimes the browser hangs. The jrun process remains at around 40-50% CPU. We have rebooted the server, stopped/started the CF service. Nothing seems to correct the problem. We tried with simple 'test' cfdoent files. Still hanging. Anyone else having problems with page freezing? I'm afraid to move to production if this isn't going to work reliably. thanks Doug...

  1. #1

    Default cfdoent hangs

    We have been generating pdfs for several weeks with no problem. All of the
    sudden earlier today, the browser started to hang whenever we get to a
    cfdoent tag. Sometimes it works, sometimes the browser hangs. The jrun
    process remains at around 40-50% CPU. We have rebooted the server,
    stopped/started the CF service. Nothing seems to correct the problem. We tried
    with simple 'test' cfdoent files. Still hanging. Anyone else having problems
    with page freezing? I'm afraid to move to production if this isn't going to
    work reliably.

    thanks
    Doug

    focused Guest

  2. #2

    Default Re: cfdoent hangs

    Hi Doug,

    Had a bit of trouble with this tag myself, discovered that the following will
    cause it to hang:

    1) Improperly nested HTML tags or block tags (div, p, table etc) not closed,
    even though the page may display in the browser.
    2) DB query errors - just see a white page, no error message or hint. The
    only way to isolate this was to remove the cfdoent tags and output the page
    as HTML.

    In addition, I have found the poor CSS support causes pages to behave in weird
    ways - like truncating overflowing columns when using a "float:left" on a table
    instead of flowing onto a second page.

    I doubt this is much help because you say you've been generating PDFs for a
    while and you tried a simple doc too, but you never know ...

    Hanszon Guest

  3. #3

    Default Re: cfdoent hangs

    Thanks for the info. I just heard of a production server with the same problem
    - cpu hung at high usage % and pdf doesn't appear. If they don't get this
    corrected...this could become a major problem for them. Were you able to clear
    things up by 'cleaning' up the code?

    Thanks again.

    focused Guest

  4. #4

    Default Re: cfdoent hangs

    I am having exactly the same problem. Macromedia... please put this one on the priority list. An acknowledgement that this is a problem would be a great start.
    Ghost of Rick James Guest

  5. #5

    Default Re: cfdoent hangs

    Same problem here. This feature needs to stable if we're going to use it in production.
    keihin Guest

  6. #6

    Default Re: cfdoent hangs

    can you post some more details? as in what exactly causes the server to hang? can you take a thread dump when the server hangs and send that to us.


    rupeshk Guest

  7. #7

    Default Re: cfdoent hangs

    We really need a stack trace and an example to get started with this.

    Technote 18339 shows you how to get a stack trace.

    Are you on Windows, Unix?

    Please, we want to look at this right away.

    Stephen Dupre
    Macromedia QA

    sdupre Guest

  8. #8

    Default Re: cfdoent hangs

    Stephen, my stack trace is below...

    We end up with a timeout after the _server_ setting of 60 seconds. The
    cfsetting requesttimeout="300" is ignored by the way.

    Windows 2003, CFMX 7, 2 CF instances

    coldfusion.doent.DoentProcessTimeOutExceptio n: The content of this
    doent process takes more than 60000 milliseconds to process. at
    coldfusion.doent.DoentProcessor.ProcessConte nt(DoentProcessor.java:127)
    at
    coldfusion.tagext.lang.DoentSectionTag.doAfterB ody(DoentSectionTag.java:26
    0) at
    cfactPrintAppraisal2ecfm1690266858.runPage(D:\webd ocs\synapse\tools\business\eva
    luation\appraisal\actPrintAppraisal.cfm:59) at
    coldfusion.runtime.CfJspPage.invoke(CfJspPage.java :152) at
    coldfusion.tagext.lang.IncludeTag.doStartTag(Inclu deTag.java:343) at
    coldfusion.runtime.CfJspPage._emptyTag(CfJspPage.j ava:1908) at
    cfudfs2ecfm1203561781$funcINCLUDE.runFunction(D:\w ebdocs\synapse\tools\business\
    evaluation\extensions\udfs\udfs.cfm:171) at
    coldfusion.runtime.UDFMethod.invoke(UDFMethod.java :348) at
    coldfusion.runtime.UDFMethod$ArgumentCollectionFil ter.invoke(UDFMethod.java:258)
    at coldfusion.filter.FunctionAccessFilter.invoke(Func tionAccessFilter.java:56)
    at coldfusion.runtime.UDFMethod.runFilterChain(UDFMet hod.java:211) at
    coldfusion.runtime.UDFMethod.invoke(UDFMethod.java :370) at
    coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage. java:1765) at
    cfindex2ecfm1521540610.runPage(D:\webdocs\synapse\ tools\business\evaluation\appr
    aisal\index.cfm:165) at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java :152)
    at coldfusion.tagext.lang.IncludeTag.doStartTag(Inclu deTag.java:343) at
    coldfusion.runtime.CfJspPage._emptyTag(CfJspPage.j ava:1908) at
    cfApplication2ecfc1530659078$funcONREQUEST.runFunc tion(D:\webdocs\synapse\tools\
    business\evaluation\Application.cfc:170) at
    coldfusion.runtime.UDFMethod.invoke(UDFMethod.java :348) at
    coldfusion.runtime.UDFMethod$ReturnTypeFilter.invo ke(UDFMethod.java:294) at
    coldfusion.runtime.UDFMethod$ArgumentCollectionFil ter.invoke(UDFMethod.java:258)
    at coldfusion.filter.FunctionAccessFilter.invoke(Func tionAccessFilter.java:56)
    at coldfusion.runtime.UDFMethod.runFilterChain(UDFMet hod.java:211) at
    coldfusion.runtime.UDFMethod.invoke(UDFMethod.java :173) at
    coldfusion.runtime.TemplateProxy.invoke(TemplatePr oxy.java:192) at
    coldfusion.runtime.TemplateProxy.invoke(TemplatePr oxy.java:145) at
    coldfusion.runtime.AppEventInvoker.invoke(AppEvent Invoker.java:55) at
    coldfusion.runtime.AppEventInvoker.onRequest(AppEv entInvoker.java:116) at
    coldfusion.filter.ApplicationFilter.invoke(Applica tionFilter.java:200) at
    coldfusion.filter.RequestMonitorFilter.invoke(Requ estMonitorFilter.java:51) at
    coldfusion.filter.PathFilter.invoke(PathFilter.jav a:86) at
    coldfusion.filter.ExceptionFilter.invoke(Exception Filter.java:50) at
    coldfusion.filter.ClientScopePersistenceFilter.inv oke(ClientScopePersistenceFilt
    er.java:28) at coldfusion.filter.BrowserFilter.invoke(BrowserFilt er.java:38) at
    coldfusion.filter.GlobalsFilter.invoke(GlobalsFilt er.java:38) at
    coldfusion.filter.DatasourceFilter.invoke(Datasour ceFilter.java:22) at
    coldfusion.CfmServlet.service(CfmServlet.java:105) at
    coldfusion.bootstrap.BootstrapServlet.service(Boot strapServlet.java:78) at
    jrun.servlet.ServletInvoker.invoke(ServletInvoker. java:91) at
    jrun.servlet.JRunInvokerChain.invokeNext(JRunInvok erChain.java:42) at
    jrun.servlet.JRunRequestDispatcher.invoke(JRunRequ estDispatcher.java:257) at
    jrun.servlet.ServletEngineService.dispatch(Servlet EngineService.java:541) at
    jrun.servlet.jrpp.JRunProxyService.invokeRunnable( JRunProxyService.java:204) at
    jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRu nnable(ThreadPool.java:426)
    at jrunx.scheduler.WorkerThread.run(WorkerThread.java :66)

    steveh1234 Guest

  9. #9

    Default Re: cfdoent hangs

    More info...

    Once we start getting these errors then no cfdoents will process... all
    will return the same error. The cpu starts running up and hangs around 50-60%.
    Restarting the CF instance is required to solve the problem.

    steveh1234 Guest

  10. #10

    Default Re: cfdoent hangs

    steve,
    thanks for the stacktrace. We would also want the thread dump. That will tell
    us the status of each thread (and hence the JVM) . that will help us finding
    the reason why the cpu is spinning or server is hanging.

    Rupesh.

    rupeshk Guest

  11. #11

    Default Re: cfdoent hangs

    Can you put together an example? We need the thread dump too but having an
    example would be good.

    If anyone on this thread can supply an example, please email directly.

    Stephen Dupre
    Macromedia QA

    sdupre Guest

  12. #12

    Default Re: cfdoent hangs

    Stephen,

    I do not have a reproducable error to give you because it seems that the
    problem only happens randomly. Since the doents are genereated from user
    entered content, it is difficult to determine if any of what the user enters
    could be the problem. The way it works for us, once the error starts
    happening, no cfdoents will process regardless of what is inside them.
    Oddly enough, CFML will process fine. So the rest of the application works up
    to the doent tag.

    I've asked our system admin for a thread dump, but it may take some time
    before we get one to send you. Hope this helps in the mean time.

    Thanks for investigating.

    steveh1234 Guest

  13. #13

    Default Re: cfdoent hangs

    See the following

    http://www.ionizedesign.com/sysmex/test_card.cfm


    It takes about a minute to generate the PDF. This is the third time this has
    occured. The first two times my provider had to restart the server (at least
    that's what they told me they did), but it keeps occurring.


    This is bad because since it takes so long to generate the PDF, the cfmail tag
    is timing out when I try to attached the PDF and email it...


    There must be something going on with cfdoent. My code hasn't changed...

    ricking Guest

  14. #14

    Default Re: cfdoent hangs

    I was having the same problem and I am about to contact Macromedia to report
    the problem wiht ColdFusion CFDOENT tag. Then after doing some tests I found
    out that the problem was that if I use an anchor tag ( <A href="filename.cfm">
    ) to call the cfm file that contains the cfdoent tag everything works fine.
    However, when I try to do the same thing calling the cfm file though the action
    attribute of a form tag, the page hangs and nothing works. This applies for
    using the action attribute to open the file in the same browser or in a new
    window by using the attribute Target="_blank".
    It seems that the problem has to do with the way the file that contains the
    cfdoent tag is being called.
    If I get a response from Macromedia I will post here later.

    JonesFC Guest

  15. #15

    Default Re: cfdoent hangs

    Hi

    Are there any news about the pdf bug mentioned .

    Our CF server worked fine producing PDFs then all of af sudden died ? not even
    the simplest PDF can be produced now.

    I?m just curious if there is any hot fix on the way?

    Sik Cambon Jensen
    ARTOGIS a/s


    ARTOSIK Guest

  16. #16

    Default Re: cfdoent hangs

    We've been able to recreate this problem over and over. Here's how:

    Start with a good run of ColdFusion and an error free page. I can run the
    script dozens of times and generate PDFs every time clicking refresh as fast as
    I can.

    Now edit that same script but add an error *inside* the CFDOENT tag - such
    as an invalid variable name - and get the ensuing error message.

    Now fix that error, save and try running the script again.... it just hangs
    and doesn't complete and requires CF to be restarted.

    So as long as we run nothing but perfect CFDoents, all is good. But god
    forbid an error happens... you need to restart CF (7.0)

    My uneducated and non-java speaking guess - something starts running to
    compile the PDF (invoked by CFDoent) and it doesn't end/terminate with the
    error message. I also guess that it is "single threaded" (or similar in
    concept) and the thread is not released... thus the next request never works.

    Anyone see anything consistent? Any way to avoid this? Any way to force the
    thread to "time out" in order to avoid hanging indefinitely?



    cul8r Guest

  17. #17

    Default Re: cfdoent hangs

    cul8r,

    Just out of curiousity:

    1. Are you on standard edition? If so, you may only have one doent
    generation thread available.

    2. Do you see the error message in the log for the error you are causing
    inside your CFDOENT tag? We do not see any suspect errors before the hang
    up.

    Thanks,

    steveh1234 Guest

  18. #18

    Default Re: cfdoent hangs

    Steve -

    1. Yes, I believe we are on standard edition. I don't know if this is a
    factor or not but an interesting thought.

    2. There is never an error generated with respect to the "hanging PDF" - not
    on screen, not in the log. I've tried CFSETTING a parameter in the script for
    a 5 second time out on the script - no help.

    Chris

    cul8r Guest

  19. #19

    Default Re: cfdoent hangs

    This is bug 61378. CFDOENT issue with CF Standard. If there is an error
    inside the <CFDOENT></CFDOENT> tags (you can force one with
    <CFOUTPUT>#doesnotexist#</CFOUTPUT> all other CFDOENT templates will pile up
    behind. If you get 8 of these, it hangs your server. (all sim request threads
    used up).

    We expect a hotfix within a day or two (single hotfix) but in the meantime,
    one workaround is placing a CFTRY/CFCATCH inside the CFDOENT tag will allow
    the template not to block.

    <cfdoent><cftry> ..... all the other CFML code ....
    <cfcatch></cfcatch></cftry></cfdoent>

    To other users on this thread with CF Enterprise, you're looking at a
    DIFFERENT problem than this. The symptom is the same (hang) but that's all.
    We'll need thread dumps when your system is hung to look into those issues
    separately.

    The fix for 61378 will do NOTHING for CF Enterprise customers.

    Stephen Dupre
    Macromedia QA

    sdupre Guest

  20. #20

    Default Re: cfdoent hangs

    Stephen,

    Just out of curiosity, can you explain why this is not an issue on Enterprise?


    Also, if anyone comes up with a reproducable error on Enterprise, please post
    it. We cannot reproduce this problem. It happens at random.

    Thanks.

    steveh1234 Guest

Page 1 of 2 12 LastLast

Similar Threads

  1. cfdoent on OS X
    By glossen in forum Coldfusion - Advanced Techniques
    Replies: 6
    Last Post: November 10th, 08:39 PM
  2. CFDoent
    By Mike Yang in forum Coldfusion Flash Integration
    Replies: 17
    Last Post: July 22nd, 05:57 AM
  3. CF hangs when database server hangs or crashes
    By Skjaeret in forum Coldfusion Server Administration
    Replies: 2
    Last Post: June 13th, 03:22 PM
  4. CFDoent - RTF
    By timstsprymsn in forum Coldfusion - Advanced Techniques
    Replies: 2
    Last Post: March 8th, 10:48 AM
  5. need help with cfdoent
    By prabin_sh in forum Coldfusion - Advanced Techniques
    Replies: 1
    Last Post: February 25th, 01:26 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139