> I am currently having a problem with ArrayNew(), and I was wondering > if anyone has seen something similar. Currently, I have a ColdFusion > page that verifies a large amount of data pulled from a database. To > initialize the arrays that will be used for this validation, a CFSCRIPT > statement is used. Within this script, approximately 1,500 arrays are > created to support the validation (just wait, it gets better... ;-) ). > Now, this work 99% of the time. However, whenever it does not work, it > returns a 13 page error to the user which displays the following > message: > > ================================================ > An error occurred while evaluating the expression: > <insert 13 pages of array declaration here> > Error near line 436, column 45. > > Parameter 1 of function ArrayNew which is now "1" must be an integer. > ================================================ > > The line where the error occurs changes every time this occurs. This > leads me to believe that ColdFusion is having a problem either > processing the file, or it can not allocate enough memory to complete > the request and defaults to this error message. Additionally, the code > executed within this file has not been changed for this release, it > just started to occur. As for the ColdFusion server configuration, it > is maintained by another contractor so we have no idea what is > configured and how. > > Now obviously, declaring 1,500 individual arrays is probably not the > best method to perform this task, however this is an inherited piece of > code and re-development would take too long at this point in my current > release cycle. I was just curious if someone had seen something like > this in the past, and if so, how did you get around it. As always, any > creative and positive ideas on the subject are appreciated.
I don't know how creative or positive you'll find this, but that's up to you. I've seen things like this in the past, and they've generally indicated that you don't have enough memory on the server. The fact that it works most of the time, and just started failing occasionally, indicates that there's some new stuff going on on the server (surprise!) but doesn't really tell you what that might be - increased traffic, another service or application running, etc. So, you might add more memory to the server, if that's an option. If you're running CF 4.5.x, you might upgrade to CF 5, which appears to handle memory better generally. Alternatively, you might address the problem by rewriting the code. I know, it's "inherited". Well, sometimes, you have to disinherit - with really bad code just like really bad relatives. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ phone: 202-797-5496 fax: 202-797-5444 ______________________________________________________________________ Why Share? Dedicated Win 2000 Server � PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER Instant Activation � $99/Month � Free Setup http://www.pennyhost.com/redirect.cfm?adcode=coldfusionc FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

