3 Replies Latest reply on Nov 8, 2007 11:56 AM by William_At_FAA

    CreateObject takes > 1sec, Ideas?

      I am aware that this is an issue that comes up from time to time, but I have been uable to find specific mentions of this problem being quite as bad as I seem to have it. I am running CF7 on a win2k3 server with a dual-core athlon 64 3700 w/ 2GB of ram, and a SQL Server 2005 database on the same machine. The hard drive is a basic 250GB RAID 1 array.

      Suddenly, on October 11, I began to receive numerous timeouts, what has amounted now to several thousand requests taking longer than 60seconds to run. I have gone back through the revisions pushed to the server around that time and I cannot find anything that stands out in particular as being the cause of this. I have to assume that there was something latent in my code that has been exacerbated by external situations, or perhaps that there is some misconfiguration of the server.

      I have seen in other posts that a lack of cflock usage can lead to problems like this, so I have been going through the code and making sure to have readonly or exclusive locks on session access (there are very few application scope accesses per request).

      The reason that this is such a problem is that during a request, there are usually at least 5-10 object instantiations, and sometimes several more for our admin reporting and payment processing interfaces.. We have a bunch of gnarly business logic that I have spent the last year isolating into CFCs, and I am being to regret the fact that I chose to use a per-object instantiaion scheme. That said, I do believe that coldFusion can handle the load, we usually average less than 1 request/sec over the day, although there are times when it goes up to 4-5 req/sec.

      Basically I am asking for any ideas you have. I know that CF is slow at instantiating cfcs, but 1500 ms is ridiculous. There is something pathological about this situation, and unfortunately it is just beyond my grasp. Should I investigate different GC algorithms? I've tried boosting the memory allocation of the JVM to 1GB, but that hasn't helped at all. I have nearly 99% of all cfc instantiation going through the same code point, so if there is some optimization I can make there, it should be easy to do.

      I appreciate any help in this matter.