Skip to main content
May 24, 2012
Question

Getting another 500 null

  • May 24, 2012
  • 1 reply
  • 1718 views

Hello,

  we are having a weird problem that just popped up.  We are getting a 500 null.  I'm not new to these having been a CF programmer fo 12 years but this one really stumps me.  Here is the basics.

Program1 includes Program2

Program2 includes Program3

Program3 includes Program4

Program4 cfexits (exittemplate) back to Program3

Program3 cfexits (exittemplate) back to Program2

Program2 ends and Program1 continues until it hits a cflocation to Program5 which is a landing page.

The cflocation does not execute and at that point we get the 500 null.  I've had the programs send e-mails to myself just before the cflocation and at the beginning of Program5 and I get P4's e-mail but not P5's.

Now here is something interesting, there is a function in Program4 that gets executed just before the cflocation and if I add a cfflush in it, the cflocation, even though everything I've seen and read is not supposed to work, it does work and we don't get the 500 null.  Also, in Program3 there is a cfsilent.  If I comment it out we don't get the 500 null.

Determined to figure this out, I continued to debug and I added cfaborts in several key places.  If I add a cfabort in Program1 anywhere below the cfinclude to Program2 and above the cflocation, I get a 500 null.  Just as an fyi, my cfaborts alway include <cfoutput>xyz</cfoutput> so they are easy to find and remove.  If I add a cfabort prior to the cfinclude to Program2 or anywhere prior to the cfexit in Program3, I see my cfabort.  I think that may be relevant because to me it appears to be a displaying issue of some sort.

Other notes, everything seems to have run and updated just fine prior to the 500 null.  The include to Program2 is within a cftransaction but the cflocation is not.  (Removing the cftransaction did not have an effect.)  Currently this happens on two servers, our Dev and Test servers.

I'm going to continue debugging since this is an important process to our business.  If anyone has any ideas I'd be happy to hear them.

Thanks in advance.

This topic has been closed for replies.

1 reply

BKBK
Community Expert
Community Expert
May 27, 2012

My initial instinct: a page is being opened, or a code procedure is being run, ad infinitum. A common cause of this is a cflocation tag in Application.cfc/Application.cfm.

May 31, 2012

Hello,

  I don't think that is our case here.  We are careful not to put cflocation's in our Application.cfm.  Since my last post, I've found out that the error occurs in all our environments, even in production it just has not been reported.  My beleif is it has to do with the cfsilent that surrounds the cfinclude and cfexit.  I broke up the cfsilent and it is working fine.  Perhaps the cfsilent didn't terminate correctly (???) and any display to the screen was not possible (unless the cfflush caused it).  I'm not sure but it's a puzzle.

Thanks.

BKBK
Community Expert
Community Expert
May 31, 2012

Cfexit? If you're not in a custom tag (and you don't seem to be), then cfabort will be more appropriate.