> I've inherited a CF app with an apparent memory leak.
> Does anyone have a systematic plan to diagnose and
> eliminate possible causes?
> 
> The Macromedia Knowledge Base article
> http://www.macromedia.com/v1/Handlers/index.cfm?ID=15014&Method=Full
> is helpful, but doesn't provide a plan of attack.
> 
> Of the list of causes on that page, the application
> has possible causes (that I know about) -- unlocked
> shared-scope variables, large cached queries, large
> record sets, and COM objects. I strongly suspect that
> it's the unlocked shared-scope variables, but it's a
> big undertaking to correct this and I need to show the
> boss that I've eliminated other causes before
> undertaking this effort.
> 
> Any suggestions?

Sure, but it might take longer to go through that systematic plan than it
would to just make sure you've locked all the variables.

First, you can look at your server logs. Depending on how you've organized
your application code, this may or may not be especially helpful, but it
should always be the first step. See if you can find which scripts are most
likely to be associated with problems, and see what's in those scripts. As I
mentioned, though, this might not give you much to go on, since your
application may have things in many scripts that, together, are problematic
- like unlocked memory variables.

Second, you'll need to set up a testing environment. You'll need to
replicate your current environment as much as possible - if you can, take
the current server(s) out of service temporarily and use them. Take a copy
of your application, and set it up separately, and simply take out portions
of your application code in sections. For example, take out all of the COM
object code. Then, load test the application, and see what happens. Then,
take out the large recordsets, and repeat.

On occasion, I've followed the same strategy, turned inside out in a way.
I've built a test application that does some of the same things done by the
problem app, and load tested that. It's a simple, but tedious, process of
elimination.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444

______________________________________________________________________
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to