Archive for June, 2008

ColdFusion 7 Memory Leak

June 20, 2008

In working on Financial Peace University Online last year, I became aware of a really ugly memory leak that had developed in the app (thankfully it was still in development, not in production). It took a few days to track down, but when I found it, it proved to have some implications that applied to all our ColdFusion web apps.

First I’ll describe the environment:

I discovered that for each singleton instance of a cfc that the ColdSpring factories provided, a little memory was leaked and never garbage collected. I simplified things to remove Mach-II, ColdSpring, and eventually everything except the simplest form I could think of. A cfm would create an instance of a cfc that had a method in it that would return a reference to itself. Then the cfm would go through 100 iterations of calling that method and place the result in an array. So I would have an array with 100 references to the same object, and still, the memory leak was present.

Finally I noticed that on my cfc method, I hadn’t specified output=”false”, though I had specified it on the cfcomponent tag. Adding output=”false” to the method that returned a reference to the cfc cured the memory leak. It seems bizarre, but if a memory leak was obvious, it wouldn’t have made it into the release version of ColdFusion.

Monkey T-Shirt

June 20, 2008

Why monkeys with lasers?

Monkey T-Shirt [Back]

Monkey T-Shirt [Front]

Monkey with Lasers?

June 18, 2008

So what’s with all the Monkey and Lasers?

Over the last 5 years our team has grown from 5 to 50 to support the web side of our business. Still, to keep up with the business, we have more and more roles we need to find new team members for. So at an offsite last year, one of our developers suggested we could solve all of our problems with an infinite number of monkeys. To really make an impact on the workload we had in front of us, not just any monkeys would do. So, inspired by Dr. Evil and his request for sharks with laser beams, it was suggested we should strap lasers to their heads.

Dr. Evil never got his sharks and of course we never got our monkeys, but it was a good laugh after a long day of architecting. The phrase stuck and eventually we put it into a sudo-theorem of sorts.

Monkey + Laser = w!©|<3d ©0d3

If you decide you like it to, you may want to get your hands on one of these.