Hello List People,
I'm having trouble figuring this one out and hope some one can point me in
the right direction.
We have a form processing script, that appears to generate some errors when
under load - or rather when multiple forms are submitted within the same
time frame.
Basically we have a formHandler.cfm script that handles submission from
multiple,different forms. The forms are processed based on description of
the form looked up in the database (ie. fields, required, formatting etc).
And the processing is done through a series of CFC's that are instantiated
and stored in the application scope.
Two problems occur. Occasionally, an error will be generated in the CFC
that does the DB insert (insertFormSubmission.cfc), and the error indicates
that the info about the form (that was retrieved when from the DB when the
form was submitted via the formID in a hidden field), is for the wrong
form! 99.5 times out of a 100 this does not happen, it can't be easily
reproduced. But over the course of the day it will happen several times. I
have gone through the CFC's and made sure all local vars are defined as
local vars and that does not seem to have helped. Where is the collison
occuring?
The second error I get occasionally, and seems to be when under load, is
regarding a UDF library (actually an individual function in that library)
thats says it can't be defined twice. The UDF library is included from
within a CFC in the application scope. Maybe thats bad practice? Too
include a UDF lib in a CFC? The call to the include looks like this, with a
test on the first method in the library to make sure it has not already
been loaded:
<cfif not isdefined("LF_fieldType")>
<cfinclude template="../blocks/udf/fieldtypelib.lf">
</cfif>
But it still occasionally generates this error: "Routines cannot be
declared more than once.". I know this is not the best way to include the
UDF lib in each of my application scoped CFC's and I am looking at moving
them to the request scope, its just alot of code to re-write and re-test.
Why does it work 99% of the time and then fail with an error about the
library already being loaded. The actual form submission process is
identical. Is there some kind of overlapping threads happening here or
something?
Can anyone point me in the right direction?
BrookD
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:242001
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54