views:

102

answers:

2

Ok, here is the background. We have a clustered environment setup for running our coldfusion server, it basically split into two different instances, that the generic address redirects requests to. I have my app setup to send me emails whenever an error is caught by a user.

Over the last week or so, I have had cases, where I have received 500+ error emails over than of 5 minutes for one user as they go through the app in question. Under normal circumstances, I might receive a dozen all day. In most of the cases, I have been able to speak with the user soon afterward, and they report not receiving any error page, and that they were able to complete their transaction just fine.

The app involved, is pretty straight forward, the user logs in, they go through about 6 different pages, each one submitting form posted data to the next, those form variables are required to proceed. The error I seem to get for each of these collections of massive emails is the absence of the first form variable being looked for on each page. "Error Message: Element SESSION_ID is undefined in FORM." - seemingly every time.

As I look at the error emails, I can see what the referring page and reporting page were, and can track the user going through the app from step to step until completion - generating these error emails dozens at a time for each page.

One of my hypotheses is, the clustered server is sending requests to both instances of the app, on each of the physical servers, and the one that the user's session resides on goes through fine, but the request to the "unused" server gets request without the form data, and fires off these error emails. Is that plausible? Thanks-


Additional info - I was just pouring through my reports, and the other main similarity between all of these occurrences is that the CGI.referrer variable (which I send in my error email) is not populated. In every case of these mass emails, none of them pass the cgi.referrer, but in all of my normal error reports, it gets added. I thought that was curious..

A: 

It may be due to the fact that the CGI vars are not always defined. it is really up to the web server to pass them on. You may want to test for their existence before depending on them... something like this...

<cfif CGI.varname IS NOT "">
   CGI variable exists
<cfelse>
   CGI variable does not exist
</cfif>

or maybe even a CFPARAM to really make sure you have your CGI vars there.

Hope this helps.

LucasS
A: 

Agreed, do a cfparam for a default value, in case of cgi variables which may not be passed by the clustered servers.

Also might be worthwhile to add some checking to your error reporting, so instead of 1000's of emails reporting the same variation of the 1-2 bugs, you just have 1 summary email...Less hassle then having to delete all those huge extra emails.

crosenblum