Skip to main content
Participating Frequently
August 1, 2019
Question

Cold Fusion 11 Application Server Crash on Form Submit

  • August 1, 2019
  • 4 replies
  • 1004 views

I am running Cold Fusion 11 and have a problem, intermittently, when a form is submitted the entire application server stops.   The application I've created has been running for several years without throwing this problem.  

I've looked through all of the log files and I've not found any indication of what is stopping the server

And, of course, the problem does not happen all the time.   I was able to recreate the issue with one of my users, so at least I know it is real and not user error.

The process is such:

A call is made to the DB to get any entries associated with the master reference key

I loop over those entries and dynamically build the form inside of tables (yeah, I'm old and lazy)

Each form field is name+indexing variable.   The indexer starts of at 1 and I just add 1 to it as the cfoutput loops

So, each form field name us unique

In the case where the server is crashing, I am only submitting ~30 fields (though I've previously upped the default quite a bit)

When the user hits 'Save' his browser [Chrome on Windows] displays the broken icon in the frame.   My browser just freezes on the form [Safari on MAC].   I do NOT get any type of error message.   Also, I do not see any indication the form has actually been submitted (no screen refresh, etc) -- though it clearly is.

This is running on an Ubuntu server.    Grepping for the process returns nothing and I have to start Cold Fusion from scratch.

I've verified nothing odd is populated in the form fields.   They are all either integers or text fields.   Very simple.

Anyone have any ideas?

Thanks!

Dave

    This topic has been closed for replies.

    4 replies

    DaveO_01Author
    Participating Frequently
    August 2, 2019

    Good thought on the CFCATCH - but I don't think I'm even getting back to the code when the form is submitted.   Normally, when I've made an error or one of my users enters 'bad' data, you get plenty of error messaging back (I have all the error output turned on for this server).  In this case nothing.

    I'll dig more into this issue after we are done with the budget this year.   Amusingly, this particular tool is used for our capital budget requests and is managing over 200 M in requests this year.   You'd think I could manage not to have it crash!

    Dave

    WolfShade
    Legend
    August 2, 2019

    Just out of curiosity.. in CFAdmin, what is the value for Server Settings > Settings > Maximum Number of POST request parameters?  It defaults to 100.  STIG recommends keeping it there.

    V/r,

    ^ _ ^

    Charlie Arehart
    Community Expert
    Community Expert
    August 2, 2019

    To Wolf's question about the "max post parameters", that setting (new in the admin as of CF10) could certainly cause a request to ERROR (if the form had more than 100 form fields), but it would not cause CF to "die".

    This is one more reason I have been pressing DaveO on his contention that CF was "dying". If that is so, I'd not expect it to be about this issue (of the max post params), but of course if CF is NOT dying, then yes this COULD be why the REQUEST is dying (failing).

    And to be clear, DaveO, if you may have only been looking in the CF application.log for evidence of any error, that one is NOT logged there. Instead, it IS logged in the very server.log I referred to above (for looking at indications of CF starting and stopping). Who knows, you may end up seeing that and finding these errors instead (and indication that CF was not in fact "dying").

    Waiting with bated breath. :-)

    /Charlie (troubleshooter, carehart. org)
    DaveO_01Author
    Participating Frequently
    August 2, 2019

    Oddly enough -- Cold Fusion does not hang - it straight up dies....instantly.   I've not found anything in the log files (though it is more than possible I've missed something).   I've been using CF for over 20 years and I've never encountered an issue this severe.

    Yup.   I am still using CFFORM and, I'm sure, a LOT of antiquated tags.   *chuckle*  

    Working with my user - it appears that if a text input field has the same string (user input) as the same field in the proceeding row, something in the submission will crash the server.   Super odd.   The form looks like this:

              <cfform name="defineequipment" action="request.cfm" method="post" enctype="multipart/form-data">

                     <cfinput type="hidden" name="manageX" value="Equipment Inventory">

                      <cfinput type="hidden" name="WUserKey" value="#WUserKey#">

                      <cfinput type="hidden" name="requestkey" value="#requestkey#">

                        <cfset #equcount# = '1'>

                   

                          <cfoutput query="getequipment">

                         <td><cfinput type="text" name="eequipment#equcount#" value="#edesc#"></td>

                        <cfset #equcount# = #equcount# + 1>

                          </cfoutput>

                   <cfinput type="hidden" name="equcount" value="#equcount#">

                         </cfform>

    There is quite a bit more to the form - but above is the area which seems to be causing the problem (Equipment Description).   As you can see, each row of field names is appended with an integer which is incremented over the loop.   So, every field name is unique.    When I process the form after submit, I loop over #equcount# and 'find' each variable name.

    What is so strange, is...when my user clicks the submit button, everything dies.   No error, no refresh of screen...nothing.   The whole process is dead on the server and I have to restart CF from scratch.

    I don't think this is a memory issue - I have some 40 cores and over 100 GB of RAM on the server.   More importantly, I have applications running which are submitting hundreds of form fields at a time and are not causing an issue at all.

    Is there another log I might check?  Or, something I can spool as I recreate the issue?

    Thanks!

    Dave

    Community Expert
    August 2, 2019

    I would try running CF as an application instead of as a server, and see if it spits up an error at the point of failure that for some reason it's unable to log.

    Dave Watts, Eidolon LLC

    Dave Watts, Eidolon LLC
    Charlie Arehart
    Community Expert
    Community Expert
    August 2, 2019

    If that submission REALLY hangs CF (you have to kill it to resolve things), then it must be doing SOMETHING to cause the problem. And I’d suspect a possible memory problem, though it could be CPU. You don’t say if you have seen either indicated, in top (since you are on Linux).

    So the first thing I’d look at is the coldfusion-error.log, or since you on Linux look also at the cfserver.log. Look at lines from just BEFORE was restarted. IS there indication of any outofmemory error? Look through the log lines to observe the date/time values, and look back as much as a few mins before you killed CF (or grep the file).

    If you are on CF Enterprise, you cold also watch things within its Server Monitor, or you could try FusionReactor, which has a free 14-day trial. It has the added benefit of logging what it tracks, so that even after a CF restart you could look into what was amiss. It would also more clearly help you to see whether it WAS a memory problem, or a CPU problem, or if the request was hanging and what happened to other requests trying to run at that time. BTW, have you clarified if other requests can run at that time, or not?

    /charlie

    /Charlie (troubleshooter, carehart. org)
    WolfShade
    Legend
    August 1, 2019

    Just off the top of my head:

    When it happens, check the browser console log just in case there is anything JavaScript related (esp if you are using [GASP] cfform).

    Check the CFAdmin logs to see if any of them are recording the issue.

    Check the webserver logs to see if any of them are recording the issue, or perhaps feedback from CF server.

    HTH,

    ^ _ ^